[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/easy-mmode.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/easy-mmode.el |
Date: |
Thu, 29 May 2003 17:54:36 -0400 |
Index: emacs/lisp/emacs-lisp/easy-mmode.el
diff -c emacs/lisp/emacs-lisp/easy-mmode.el:1.48
emacs/lisp/emacs-lisp/easy-mmode.el:1.49
*** emacs/lisp/emacs-lisp/easy-mmode.el:1.48 Fri Apr 18 13:31:05 2003
--- emacs/lisp/emacs-lisp/easy-mmode.el Thu May 29 17:54:35 2003
***************
*** 1,6 ****
;;; easy-mmode.el --- easy definition for major and minor modes
! ;; Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <address@hidden>
;; Maintainer: Stefan Monnier <address@hidden>
--- 1,6 ----
;;; easy-mmode.el --- easy definition for major and minor modes
! ;; Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <address@hidden>
;; Maintainer: Stefan Monnier <address@hidden>
***************
*** 98,109 ****
--- 98,116 ----
By default, the mode is buffer-local.
:init-value VAL Same as the INIT-VALUE argument.
:lighter SPEC Same as the LIGHTER argument.
+ :keymap MAP Same as the KEYMAP argument.
:require SYM Same as in `defcustom'.
For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\"
:lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
...BODY CODE...)"
+ (declare (debug (&define name stringp
+ [&optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp]
+ [&rest [keywordp sexp]]
+ def-body)))
;; Allow skipping the first three args.
(cond
***************
*** 121,132 ****
(extra-args nil)
(extra-keywords nil)
(require t)
- (keymap-sym (if (and keymap (symbolp keymap)) keymap
- (intern (concat mode-name "-map"))))
(hook (intern (concat mode-name "-hook")))
(hook-on (intern (concat mode-name "-on-hook")))
(hook-off (intern (concat mode-name "-off-hook")))
! keyw)
;; Check keys.
(while (keywordp (setq keyw (car body)))
--- 128,137 ----
(extra-args nil)
(extra-keywords nil)
(require t)
(hook (intern (concat mode-name "-hook")))
(hook-on (intern (concat mode-name "-on-hook")))
(hook-off (intern (concat mode-name "-off-hook")))
! keyw keymap-sym)
;; Check keys.
(while (keywordp (setq keyw (car body)))
***************
*** 138,145 ****
--- 143,154 ----
(:extra-args (setq extra-args (pop body)))
(:group (setq group (nconc group (list :group (pop body)))))
(:require (setq require (pop body)))
+ (:keymap (setq keymap (pop body)))
(t (push keyw extra-keywords) (push (pop body) extra-keywords))))
+ (setq keymap-sym (if (and keymap (symbolp keymap)) keymap
+ (intern (concat mode-name "-map"))))
+
(unless group
;; We might as well provide a best-guess default group.
(setq group
***************
*** 204,214 ****
(progn
,(if globalp `(customize-mark-as-set ',mode))
(unless (current-message)
! (message ,(format "%s %%sabled" pretty-name)
(if ,mode "en" "dis")))))
(force-mode-line-update)
;; Return the new setting.
,mode)
;; Autoloading an easy-mmode-define-minor-mode autoloads
;; everything up-to-here.
:autoload-end
--- 213,224 ----
(progn
,(if globalp `(customize-mark-as-set ',mode))
(unless (current-message)
! (message ,(format "%s %%sabled" pretty-name)
(if ,mode "en" "dis")))))
(force-mode-line-update)
;; Return the new setting.
,mode)
+
;; Autoloading an easy-mmode-define-minor-mode autoloads
;; everything up-to-here.
:autoload-end
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/easy-mmode.el,
Stefan Monnier <=