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

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

Re: Derived Mode 101 HOWTO


From: Johan Bockgård
Subject: Re: Derived Mode 101 HOWTO
Date: Sun, 12 Mar 2006 06:29:36 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Tim Johnson <address@hidden> writes:

> (defvar newlisp-font-lock-keywords
>    `(,@scheme-font-lock-keywords
>      (,(concat "\\<\\(" newlisp-keywords "\\)\\>")
>       . font-lock-newlisp-keywords-face))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[C-h v font-lock-keywords]

Emacs:

    "FACENAME is an expression whose value is the face name to use."
                    ^^^^^^^^^^^^^^^^^^^^^^

XEmacs:

    "FACE-FORM :== The symbol naming a defined face. | Expression whos
    value is the face name to use. If you want FACE-FORM to be a
    symbol that evaluates to a face, use a form like "(progn sym)"."


> (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")))))))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[C-h v font-lock-defaults]

Emacs:

  "If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form
  (CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table"
   ^^^^^^^^^^^^^^

XEmacs:

  "If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form
  (CHAR . STRING) used to set the local Font Lock syntax table"
   ^^^^

-- 
Johan Bockgård


reply via email to

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