Show
Ignore:
Timestamp:
11/26/05 08:33:26 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/emacs-CVS_HEAD/lisp/emacs-lisp/easy-mmode.el

    r3823 r3988  
    273273TURN-ON is a function that will be called with no args in every buffer 
    274274  and that should try to turn MODE on if applicable for that buffer. 
    275 KEYS is a list of CL-style keyword arguments: 
    276 :group to specify the custom group. 
     275KEYS is a list of CL-style keyword arguments.  As the minor mode 
     276  defined by this function is always global, any :global keyword is 
     277  ignored.  Other keywords have the same meaning as in `define-minor-mode', 
     278  which see.  In particular, :group specifies the custom group. 
     279  The most useful keywords are those that are passed on to the 
     280  `defcustom'.  It normally makes no sense to pass the :lighter 
     281  or :keymap keywords to `define-global-minor-mode', since these 
     282  are usually passed to the buffer-local version of the minor mode. 
    277283 
    278284If MODE's set-up depends on the major mode in effect when it was 
     
    286292         (pretty-global-name (easy-mmode-pretty-mode-name global-mode)) 
    287293         (group nil) 
    288          (extra-args nil) 
     294         (extra-keywords nil) 
    289295         (MODE-buffers (intern (concat global-mode-name "-buffers"))) 
    290296         (MODE-enable-in-buffers 
     
    293299          (intern (concat global-mode-name "-check-buffers"))) 
    294300         (MODE-cmhh (intern (concat global-mode-name "-cmhh"))) 
    295          (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))) 
     301         (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))) 
     302         keyw) 
    296303 
    297304    ;; Check keys. 
    298     (while (keywordp (car keys)) 
    299       (case (pop keys
    300         (:extra-args (setq extra-args (pop keys))) 
     305    (while (keywordp (setq keyw (car keys))) 
     306      (setq keys (cdr keys)
     307      (case keyw 
    301308        (:group (setq group (nconc group (list :group (pop keys))))) 
    302         (t (setq keys (cdr keys))))) 
     309        (:global (setq keys (cdr keys))) 
     310        (t (push keyw extra-keywords) (push (pop keys) extra-keywords)))) 
    303311 
    304312    (unless group 
     
    318326in which `%s' turns it on." 
    319327                  pretty-name pretty-global-name pretty-name turn-on) 
    320          :global t :extra-args ,extra-args ,@group 
     328         :global t ,@group ,@(nreverse extra-keywords) 
    321329 
    322330         ;; Setup hook to handle future mode changes and new buffers.