2

I'm using the latest nXhtml checked out from the repo, and using GNU Emacs version 24.0.91.1. When I open a PHP file it shows as un-syntax-highlighted text, and I get a compile error:

Error: Wrong type argument: number-or-marker-p, nil

and a message in the log:

File mode specification error: (cl-assertion-failed (functionp byte-compiled-fun))

I'm avoiding my .emacs and .emacs.d by running emacs with this command:

emacs -Q --eval '(load "/path/to/nxhtml/autostart")' /path/to/nxhtml/tests/in/heredoc.php

Even if you don't have a fix, how can I go about debugging this issue?

MDCore
  • 17,583
  • 8
  • 43
  • 48

2 Answers2

1

There seem to be a fair amount of such wrong-type-argument errors lately with the development version of Emacs (24). This might represent an Emacs bug. Or it might represent an nXhtml bug.

I suggest starting by notifying Lennart, the nXhtml author, trying to give him a clear recipe, starting from emacs -Q.

If that doesn't help, consider filing an Emacs bug: M-x report-emacs-bug.

To try to debug it a bit yourself, be sure to load only source files (e.g. for nXhtml), i.e., *.el, not *.elc, starting preferably with emacs -Q (no init file). Do M-x set-variable debug-on-error t to see where the error is raised. Then perhaps use M-x debug-on-entry FUNCTION, where FUNCTION is the function where the error seems to have been raised. Then step through the Emacs debugger, hitting d to step and c to skip through a step.

But again, I suggest starting with Lennart.

Drew
  • 29,895
  • 7
  • 74
  • 104
  • Thanks! I will definitely going to contact Lennart. The debugging sounds interesting though so I'm going to try that too :) – MDCore Nov 18 '11 at 15:56
0

Try the newest version of Emacs.

I had the same problem (on Windows 7):

Error: Wrong type argument: number-or-marker-p, nil

at line 1471 of nxhtml-loaddefs.el.

Nxhtml seems fine on Emacs 24.1.50.1 (23 April 2012).

http://alpha.gnu.org/gnu/emacs/windows/?C=M;O=D

23emacs
  • 113
  • 7