Sorry Matt, but I think there is still something wrong with font-lock.
When starting XEmacs, the little progress meter that says "Fontifying
World" tells me "Fontifying Aborted...".
And if you eval the following:
-----------
(defun world-mode ()
"eicq resource file mode.
Quick hack for font-lock. Each record is separated by \"==== \" at the
beginning of the line."
(interactive)
(kill-all-local-variables)
(setq mode-name "world")
(setq major-mode 'world-mode)
(setq fill-column 100)
(auto-fill-mode 1)
;; hiding details for privacy
(outline-minor-mode)
(set (make-local-variable 'outline-regexp)
"==== ")
;; highlight this month and next month
;; format example: "^Aug 08, 1979$"
(let* ((this-month (string-to-number (format-time-string "%m")))
(this-month-name (aref eicq-monthnames this-month))
(next-month-name (aref eicq-monthnames (1+ this-month)))
(month-regexp (format "^%s.*\\|^%s.*"
this-month-name next-month-name)))
(setq font-lock-keywords
;; highlight separator
`(("^==== " (0 'font-lock-warning-face t))
;; highlight date
(,month-regexp (0 'highlight t))
;; highlight keyword prefixed with :
(":\\(\\w\\|-\\)+" 0 font-lock-reference-face t))))
(font-lock-mode 1))
------------
And then:
M-x world-mode
It gives:
Wrong type argument: markerp, nil
With this backtrace:
# bind (standard-output stack-trace-on-signal debug-on-signal stack-trace-on-error
debug-on-error)
marker-position(nil)
# bind (loudly end start)
font-lock-fontify-syntactically-region(1 531 nil)
# (unwind-protect ...)
# bind (modified buffer-undo-list inhibit-read-only old-syntax-table buffer-file-name
buffer-file-truename loudly end beg)
font-lock-default-fontify-region(1 531 nil)
# bind (loudly end beg)
font-lock-fontify-region(1 531)
# (unwind-protect ...)
# bind (match-data)
# (unwind-protect ...)
# bind (message verbose end start buffer)
lazy-shot-fontify-internal(#<buffer "world"> 1 531 t "")
# bind (start end buffer stealth extent)
lazy-shot-lock-extent(#<destroyed extent> nil)
# bind (extent)
lazy-shot-redisplay-function(#<destroyed extent>)
# (condition-case ... . error)
# (catch top-level ...)
That code snippet above (world-mode) works fine with the old, pre
syntax-table font-lock.el.
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|