/[emacs]/emacs/lisp/emacs-lisp/easy-mmode.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/easy-mmode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.67 by lute, Mon Jul 4 17:33:35 2005 UTC revision 1.68 by teirllm, Thu Jul 14 00:56:13 2005 UTC
# Line 142  For example, you could write Line 142  For example, you could write
142    (let* ((mode-name (symbol-name mode))    (let* ((mode-name (symbol-name mode))
143           (pretty-name (easy-mmode-pretty-mode-name mode lighter))           (pretty-name (easy-mmode-pretty-mode-name mode lighter))
144           (globalp nil)           (globalp nil)
145             (initialize nil)
146           (group nil)           (group nil)
147           (extra-args nil)           (extra-args nil)
148           (extra-keywords nil)           (extra-keywords nil)
# Line 159  For example, you could write Line 160  For example, you could write
160          (:lighter (setq lighter (pop body)))          (:lighter (setq lighter (pop body)))
161          (:global (setq globalp (pop body)))          (:global (setq globalp (pop body)))
162          (:extra-args (setq extra-args (pop body)))          (:extra-args (setq extra-args (pop body)))
163            (:initialize (setq initialize (list :initialize (pop body))))
164          (:group (setq group (nconc group (list :group (pop body)))))          (:group (setq group (nconc group (list :group (pop body)))))
165          (:require (setq require (pop body)))          (:require (setq require (pop body)))
166          (:keymap (setq keymap (pop body)))          (:keymap (setq keymap (pop body)))
# Line 167  For example, you could write Line 169  For example, you could write
169      (setq keymap-sym (if (and keymap (symbolp keymap)) keymap      (setq keymap-sym (if (and keymap (symbolp keymap)) keymap
170                         (intern (concat mode-name "-map"))))                         (intern (concat mode-name "-map"))))
171    
172        (unless initialize
173          (setq initialize
174                '(:initialize 'custom-initialize-default)))
175    
176      (unless group      (unless group
177        ;; We might as well provide a best-guess default group.        ;; We might as well provide a best-guess default group.
178        (setq group        (setq group
# Line 196  See the command `%s' for a description o Line 202  See the command `%s' for a description o
202              `(defcustom ,mode ,init-value              `(defcustom ,mode ,init-value
203                 ,(format base-doc-string pretty-name mode mode)                 ,(format base-doc-string pretty-name mode mode)
204                 :set 'custom-set-minor-mode                 :set 'custom-set-minor-mode
205                 :initialize 'custom-initialize-default                 ,@initialize
206                 ,@group                 ,@group
207                 :type 'boolean                 :type 'boolean
208                 ,@(cond                 ,@(cond

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26