This bug report will be sent to the XEmacs Development Team,
not to your local site managers!!
Please write in English, because the XEmacs maintainers do not have
translators to read other languages for them.
In XEmacs 21.2 (beta46) "Urania" [Lucid] (i686-pc-linux, Mule) of Sun Apr 15
2001
configured using `configure i686-pc-linux --prefix=/opt --with-mule --with-xim=xlib
--without-toolbars --with-dialogs=no --with-menubars=lucid --with-scrollbars=lucid
--with-widgets=athena --with-athena=3d --error-checking=none '--cflags=-O3
-mcpu=pentiumpro -march=pentiumpro''
As Norbert reported in the message:
http://list-archive.xemacs.org/xemacs-beta/200104/msg00301.html
font-lock doesn't work well with ruby-mode because it uses a
special form of keyword in `font-lock-syntactic-keywords'
(setq font-lock-syntactic-keywords
'(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
("\\(#\\)[{$@]" 1 (1 . nil))
("\\(/\\)\\([^/\n]\\|\\\\/\\)*\\(/\\)"
(1 (7 . ?'))
(3 (7 . ?')))))
`font-lock-apply-highlight' function chokes on the last
keyword:
("\\(/\\)\\([^/\n]\\|\\\\/\\)*\\(/\\)"
(1 (7 . ?'))
(3 (7 . ?')))
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
- open a new file, say ~/tmp/sample.rb
- load ruby-mode and enable it
- start editing ~/tmp/sample.rb: '/test/'
As long as the second forward slash is entered XEmacs popups
an error message:
"(warning/warning) Error caught in `font-lock-pre-idle-hook': (malformed-list
?\')"
However, if I disable font-lock and then enable it again,
problem goes away for this buffer.
and here is the backtrace:
Signaling: (malformed-list ?\')
eval((7 . ?\'))
(setq newface (eval newface))
(or (symbolp newface) (setq newface (eval newface)))
(let ((newface ...)) (or (symbolp newface) (setq newface ...)) (cond (... ...) (... nil)
(... ...) (... ...) (... ...) (... ...) (... ...)))
(let* ((match ...) (start ...) (end ...) (override ...)) (let (...) (or ... ...) (cond
... ... ... ... ... ... ...)))
font-lock-apply-highlight((1 (7 . ?\')))
(let ((end ...)) (font-lock-apply-highlight (car highlights)) (and end (goto-char
end)))
(if (numberp (car ...)) (let (...) (font-lock-apply-highlight ...) (and end ...))
(font-lock-fontify-anchored-keywords (car highlights) end))
(while highlights (if (numberp ...) (let ... ... ...)
(font-lock-fontify-anchored-keywords ... end)) (setq highlights (cdr highlights)))
(while (and (< ... end) (if ... ... ...)) (setq progress (+ ... ... 5)) (when (and
loudly ...) (progress-feedback-with-label ... "Fontifying %s... (regexps)"
progress bufname)) (setq old-progress progress) (setq highlights (cdr keyword)) (while
highlights (if ... ... ...) (setq highlights ...)))
(while keywords (setq keyword (car keywords) matcher (car keyword)) (goto-char start)
(while (and ... ...) (setq progress ...) (when ... ...) (setq old-progress progress) (setq
highlights ...) (while highlights ... ...)) (setq iter (1+ iter)) (setq keywords (cdr
keywords)))
(let* ((case-fold-search font-lock-keywords-case-fold-search) (keywords ...) (bufname
...) (progress 5) (old-progress 5) (iter 0) (nkeywords ...) keyword matcher highlights)
(while keywords (setq keyword ... matcher ...) (goto-char start) (while ... ... ... ...
... ...) (setq iter ...) (setq keywords ...)))
(let ((loudly ...)) (let* (... ... ... ... ... ... ... keyword matcher highlights)
(while keywords ... ... ... ... ...)) (if loudly (progress-feedback-with-label ...
"Fontifying %s... " 100 ...)))
font-lock-fontify-keywords-region(1 7 nil)
(progn (if font-lock-syntax-table (set-syntax-table font-lock-syntax-table))
(font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords
(font-lock-fontify-syntactic-keywords-region beg end)) (unless font-lock-keywords-only
(font-lock-fontify-syntactically-region beg end loudly))
(font-lock-fontify-keywords-region beg end loudly))
(unwind-protect (progn (if font-lock-syntax-table ...) (font-lock-unfontify-region beg
end) (when font-lock-syntactic-keywords ...) (unless font-lock-keywords-only ...)
(font-lock-fontify-keywords-region beg end loudly)) (set-syntax-table old-syntax-table)
(and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))
(let ((modified ...) (buffer-undo-list t) (inhibit-read-only t) (old-syntax-table ...)
buffer-file-name buffer-file-truename) (unwind-protect (progn ... ... ... ... ...)
(set-syntax-table old-syntax-table) (and ... ... ...)))
font-lock-default-fontify-region(1 7 nil)
funcall(font-lock-default-fontify-region 1 7 nil)
font-lock-fontify-region(1 7)
(lambda (beg end val) (font-lock-fontify-region beg end))(1 7 t)
map-range-table((lambda (beg end val) (font-lock-fontify-region beg end)) #s(range-table
data ((1 7) t)))
(let ((zmacs-region-stays zmacs-region-stays)) (map-extents (function ...) nil nil nil
nil nil (quote font-lock-pending) t) (put-text-property (point-min) (point-max) (quote
font-lock-pending) nil) (map-range-table (function ...) font-lock-range-table))
(save-restriction (widen) (let (...) (map-extents ... nil nil nil nil nil ... t)
(put-text-property ... ... ... nil) (map-range-table ... font-lock-range-table)))
(save-excursion (save-restriction (widen) (let ... ... ... ...)))
(save-current-buffer (set-buffer buffer) (save-excursion (save-restriction ... ...)))
(with-current-buffer buffer (save-excursion (save-restriction ... ...)))
(progn (clear-range-table font-lock-range-table) (with-current-buffer buffer
(save-excursion ...)))
(if (buffer-live-p buffer) (progn (clear-range-table font-lock-range-table)
(with-current-buffer buffer ...)))
(when (buffer-live-p buffer) (clear-range-table font-lock-range-table)
(with-current-buffer buffer (save-excursion ...)))
(lambda (buffer dummy) (remhash buffer font-lock-pending-buffer-table) (when
(buffer-live-p buffer) (clear-range-table font-lock-range-table) (with-current-buffer
buffer ...)))(#<buffer "sample.rb"> t)
maphash((lambda (buffer dummy) (remhash buffer font-lock-pending-buffer-table) (when
(buffer-live-p buffer) (clear-range-table font-lock-range-table) (with-current-buffer
buffer ...))) #<hash-table size 0/29 weakness key 0x25da>)
(progn (maphash (function ...) font-lock-pending-buffer-table))
(unwind-protect (progn (maphash ... font-lock-pending-buffer-table)) (store-match-data
match-data))
(let ((match-data ...)) (unwind-protect (progn ...) (store-match-data match-data)))
(save-match-data (maphash (function ...) font-lock-pending-buffer-table))
font-lock-fontify-pending-extents()
(if (> (hash-table-count font-lock-pending-buffer-table) 0)
(font-lock-fontify-pending-extents))
(condition-case font-lock-error (if (> ... 0) (font-lock-fontify-pending-extents))
(error (warn "Error caught in `font-lock-pre-idle-hook': %s"
font-lock-error)))
font-lock-pre-idle-hook()
Regards,
--
Triet H. Lai