help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font-lock with newcomment.el


From: David C Sterratt
Subject: Re: Font-lock with newcomment.el
Date: 30 May 2003 16:02:05 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> lawrence mitchell writes:

 > David C Sterratt wrote: [...] Having to repeat font-lock-defaults
 > with one minor change.

 > How about: (setq font-lock-defaults `((nnrnhoc-font-lock-keywords)
 >                            nil nil ((?_ . "w")
 >                             (?\n . "> b") (?/ . ,(if (string-match
 >                             "XEmacs"
 >                                                      (emacs-version))
 >                                        ". 1456" ". 124b"))
 >                             (?* . ". 23") (?\^m . "> b"))))
 
 > That way, you only have a different bit for the XEmacs/Emacs
 > difference, rather than having to repeat the entire setq twice.

I thought something like that should be possible, and tried similar
things, though with a cond around the cons cell rather the cdr.  Your
scheme looks very nice, but Emacs tells me

Debugger entered--Lisp error: (invalid-read-syntax ". in wrong context")
  eval-buffer(#<buffer  *load*> nil "nrnhoc" nil t)
  ;;; Reading at buffer position 9577
  
load-with-code-conversion("/home/sterratt/datastore/share/emacs/site-lisp/nrnhoc.el"
 "nrnhoc" nil nil)
  nrnhoc-mode()

when I try it with the comma in.  I thought the comma might be a typo,
so left it out, but instead I got:

Debugger entered--Lisp error: (wrong-type-argument stringp (if (string-match 
"XEmacs" (emacs-version)) ". 1456" ". 124b"))
  modify-syntax-entry(47 (if (string-match "XEmacs" (emacs-version)) ". 1456" 
". 124b") #^[t nil (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (2097164) (0) (0) 
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) 
(1) (7) (1) (2) (2) (3) (1) (4 . 41) (5 . 40) (3) (3) (1) (3) (1) (3) ...])
  font-lock-set-defaults()
  font-lock-mode-internal(t)

Thanks for you interest.  

David.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]