nxhtml mode with php breaks in emacs24

Bug #988109 reported by Russell Sim
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
nXhtml
New
Undecided
Unassigned

Bug Description

Hello, I am having some problems with nxhtml mode and emacs 24. Once you open a file it seems to open but in the background is throwing some errors, as a result there is no syntax hilighting of any PHP :( and editing is slowed substantially to the point where it is basically not usable.

File Open Error
============

Checking if all php...
... multi major mode
Using vacuous schema
MU:mumamo-do-fontify-2: mumamo-do-fontify m=php-mode, s/e=1/517 syn-min/max=6/1482: Wrong type argument: syntax-table-p, nil
** In buffer comment-wrapper.tpl.php
  backtrace()
  mumamo-display-error(mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" php-mode 1 517 6 1482 "Wrong type argument: syntax-table-p, nil")
  byte-code("\306\307\310

\311
!&\207" [chunk-major start end chunk-syntax-min chunk-syntax-max err mumamo-display-error mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" error-message-string] 10)
  byte-code("\306 \211

]
^
\307
 \310\311\312


J\211
U\2035

<snip pages of bytecode>

buffer table php-mode-syntax-table ret body] 259]((progn (mumamo-do-fontify 1 517 nil 6 1482 major)))
  byte-code("\306\307\"\211\310 !
J\311\312



\313BBBBBBD!\210+\306\207" [major need-major-mode evaled-set-mode major-mode start end mumamo-get-major-mode-substitute fontification mumamo-get-major-mode-setup progn mumamo-do-fontify (major) verbose chunk-syntax-min chunk-syntax-max] 10)
  mumamo-fontify-region-with(1 517 nil php-mode 6 1482)
  mumamo-fontify-region-1(1 517 nil)
  mumamo-fontify-region(1 517 nil)
  font-lock-fontify-region(1 517)
  run-hook-with-args(font-lock-fontify-region 1 517)
  byte-code("\302\303 #\207" [start next run-hook-with-args jit-lock-functions] 4)
  jit-lock-fontify-now(1 501)
  jit-lock-function(1)
  mumamo-jit-lock-function(1)

Editing Error
==========

mumamo-do-fontify-2: mumamo-do-fontify m=php-mode, s/e=449/494 syn-min/max=454/492: Args out of range: 5, 492
MU:mumamo-do-fontify-2: mumamo-do-fontify m=php-mode, s/e=510/525 syn-min/max=515/523: Args out of range: 5, 523
** In buffer page.tpl.php
  backtrace()
  mumamo-display-error(mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" php-mode 510 525 515 523 "Args out of range: 5, 523")
  byte-code("\306\307\310

\311
!&\207" [chunk-major start end chunk-syntax-min chunk-syntax-max err mumamo-display-error mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" error-message-string] 10)
  byte-code("\306 \211

]
^
\307
 \310\311\312


J\211
U\2035

<snip pages of bytecode>

buffer table php-mode-syntax-table ret body] 259]((progn (mumamo-do-fontify 510 525 nil 515 523 major)))
  byte-code("\306\307\"\211\310 !
J\311\312



\313BBBBBBD!\210+\306\207" [major need-major-mode evaled-set-mode major-mode start end mumamo-get-major-mode-substitute fontification mumamo-get-major-mode-setup progn mumamo-do-fontify (major) verbose chunk-syntax-min chunk-syntax-max] 10)
  mumamo-fontify-region-with(510 525 nil php-mode 515 523)
  mumamo-fontify-region-1(506 527 nil)
  mumamo-fontify-region(506 527 nil)
  font-lock-fontify-region(506 527)
  run-hook-with-args(font-lock-fontify-region 506 527)
  byte-code("\302\303 #\207" [start next run-hook-with-args jit-lock-functions] 4)
  jit-lock-fontify-now(506 1006)
  jit-lock-function(506)
  mumamo-jit-lock-function(506)

Thank you,
Russell

Revision history for this message
lborgman (lennart-borgman) wrote :

Thanks for the bug report, Russell. I have not had time to test Emacs 24 myself so I have not seen this problem.

Could you please try the html-mumamo-mode instead of nxhtml-mumamo-mode?

Revision history for this message
Russell Sim (russell-sim) wrote :

good idea! I set the default mode using
(setq auto-mode-alist (cons '("\\.php$" . html-mumamo-mode) auto-mode-alist))

but html-mumamo-mode seems to produce the same error,

mumamo-do-fontify-2: mumamo-do-fontify m=php-mode, s/e=1263/1291 syn-min/max=1268/1289: Wrong type argument: syntax-table-p, nil
MU:mumamo-do-fontify-2: mumamo-do-fontify m=php-mode, s/e=1034/1059 syn-min/max=1039/1057: Wrong type argument: syntax-table-p, nil
** In buffer maintenance-page.tpl.php
  backtrace()
  mumamo-display-error(mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" php-mode 1034 1059 1039 1057 "Wrong type argument: syntax-table-p, nil")
  byte-code("\306\307\310

\311
!&\207" [chunk-major start end chunk-syntax-min chunk-syntax-max err mumamo-display-error mumamo-do-fontify-2 "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s" error-message-string] 10)
  byte-code("\306 \211

]
^
\307
 \310\311\312


J\211
U\2035

<snip>

  byte-code("\306\307\"\211\310 !
J\311\312



\313BBBBBBD!\210+\306\207" [major need-major-mode evaled-set-mode major-mode start end mumamo-get-major-mode-substitute fontification mumamo-get-major-mode-setup progn mumamo-do-fontify (major) verbose chunk-syntax-min chunk-syntax-max] 10)
  mumamo-fontify-region-with(1034 1059 nil php-mode 1039 1057)
  mumamo-fontify-region-1(1008 1066 nil)
  mumamo-fontify-region(1008 1066 nil)
  font-lock-fontify-region(1008 1066)
  run-hook-with-args(font-lock-fontify-region 1008 1066)
  byte-code("\302\303 #\207" [start next run-hook-with-args jit-lock-functions] 4)
  jit-lock-fontify-now(1008 1508)
  jit-lock-function(1008)
  mumamo-jit-lock-function(1008)

Revision history for this message
Russell Sim (russell-sim) wrote :

Sample PHP file that has at least one error every time.

Revision history for this message
Russell Sim (russell-sim) wrote :

Contents of emacs messages buffer when loading sample file. I have tried to turn up the debugging messages in the hope that someone can see an obvious problem.

Revision history for this message
lborgman (lennart-borgman) wrote :

Thanks Russell. I have just installed the released version of Emacs 24.1. I got another error message with your example (starting for "emacs -Q -l nxhtml/autostart.el".

It does not look simple at all. For some reason the syntax table was nil.

I do not have time to debug it now. If someone wants to dig into this it would be great.

Revision history for this message
Tjitte de Vries (vrieskist) wrote :

I would like to say that I still have the bug as shown by Lennart.
I'm using Emacs 24.2.1 (from Macports) and nxhtml 2.09 beta (from github).

Revision history for this message
Mathias Tausen (mathias-tausen) wrote :

I'd like to point out that this is still an issue - I'm using emacs 24.3.1 and nxhtml 2.09beta.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.