unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David C Sterratt <david.c.sterratt@ed.ac.uk>
Subject: Re: Font-lock with newcomment.el
Date: 30 May 2003 16:02:05 +0100	[thread overview]
Message-ID: <eyuisrseavm.fsf@canonmills.inf.ed.ac.uk> (raw)
In-Reply-To: ?fnord?87u1bcfyjv.fsf@ID-97657.usr.dfncis.de

>>>>> 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.

      parent reply	other threads:[~2003-05-30 15:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-29 16:07 Font-lock with newcomment.el David C Sterratt
2003-05-29 17:22 ` lawrence mitchell
2003-05-29 17:31 ` Stefan Monnier
2003-05-30 11:12   ` David C Sterratt
2003-05-30 11:45     ` lawrence mitchell
2003-05-30 13:57       ` Stefan Monnier
2003-05-30 15:20         ` David C Sterratt
2003-05-30 16:23           ` Kevin Rodgers
2003-06-02 10:06             ` David C Sterratt
2003-05-30 16:34           ` Stefan Monnier
2003-05-30 15:02       ` David C Sterratt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eyuisrseavm.fsf@canonmills.inf.ed.ac.uk \
    --to=david.c.sterratt@ed.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).