all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: Derived Mode 101 HOWTO
Date: Mon, 13 Mar 2006 01:48:37 -0000	[thread overview]
Message-ID: <slrne19htd.3j3.tim@linus.johnson.com> (raw)
In-Reply-To: 87zmjvbwp6.fsf-monnier+gnu.emacs.help@gnu.org

On 2006-03-12, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> Perhaps time for
>> (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
 
  I thought that I had already posted the following, but since I see no
  sign of it, one more time (and thanks to Johan's suggestion) the
  derived-mode form now looks like this:
;; code
 (define-derived-mode newlisp-mode scheme-mode "newlisp"
  "A major mode for Newlisp."
  (set (make-local-variable 'font-lock-defaults)
       (cons 'newlisp-font-lock-keywords
             ;; Copy the rest of font-lock-defaults from
             ;; scheme-mode if available.
             (or (cdr font-lock-defaults)
                 '(nil t 
					   ;(("+-*/.<>=!?$%_&~^:" . "w"))
					   ((?+ . "w") (?- . "w") (?* . "w") (?/ . "w")
					    (?. . "w") (?< . "w") (?> . "w") (?= . "w")
                        (?? . "w") (?$ . "w") (?% . "w") (?_ . "w")
                        (?& . "w") (?~ . "w") (?^ . "w") (?: . "w"))
					   ))))
  (message "Newlisp Derived Mode Loaded!")) 
  The good news:
  The words for the face now appear as highlighted properly in XEmacs, but
  The bad news is:

  there is no fontifaction in GNU Emacs.
  list-text-properties-at returns 
  Text property at 2326:  fontified  t
  And emacs shows the following message:

  Error during redisplay: 
    (void-variable font-lock-newlisp-keywords-face) [2 times]

  Even with debug on, I see no stack trace, this is stored
  in *Messages*

  evaluating font-lock-keywords returns the following:

  (t
  ("(\\(define\\*?\\(\\(\\|-public\\|-method\\|-generic\\(-procedure\\)?\\)\\
  |\\(-syntax\\|-macro\\)\\|-class\\|-module\\)\\)\\>[
  ]*(?\\(\\sw+\\)?" (1 font-lock-keyword-face) (6 (cond ... ... ...) nil
  t))
  ("\\<\\(a\\(?:cos\\|dd\\|nd\\|pp\\(?:end\\(?:\\)?\\|ly\\)\\|r\\(?:gs\\
  |ray\\)\\)\\)\\>"
  (0 font-lock-newlisp-keywords-face)))

  wrapped to accomodate mailer...
-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

  reply	other threads:[~2006-03-13  1:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06 17:59 Derived Mode 101 HOWTO Tim Johnson
2006-03-07 18:01 ` Stefan Monnier
2006-03-08  2:58   ` Tim Johnson
2006-03-08  5:46     ` Stefan Monnier
2006-03-08 16:58       ` Tim Johnson
2006-03-11 17:15         ` Stefan Monnier
2006-03-12  0:57           ` Tim Johnson
2006-03-12 13:49             ` Stefan Monnier
2006-03-13  1:48               ` Tim Johnson [this message]
2006-03-13 10:10                 ` Johan Bockgård
2006-03-13 17:57                   ` Tim Johnson
2006-03-13 21:35                     ` Johan Bockgård
2006-03-13 23:57                       ` Tim Johnson
2006-03-12  5:29     ` Johan Bockgård
2006-03-12 17:50       ` Tim Johnson
2006-03-12 18:14         ` Johan Bockgård

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

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

  git send-email \
    --in-reply-to=slrne19htd.3j3.tim@linus.johnson.com \
    --to=tim@johnsons-web.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.