]> code.delx.au - gnu-emacs/blobdiff - lisp/subr.el
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
[gnu-emacs] / lisp / subr.el
index 7f5856f1f04326cc5aee58b6c7353e8357b717d7..0c0152a85b8e9b84ddab41063e33d40a1b477f79 100644 (file)
@@ -36,27 +36,6 @@ Each element of this list holds the arguments to one call to `defcustom'.")
   (setq custom-declare-variable-list
        (cons arguments custom-declare-variable-list)))
 
-\f
-(defun macro-declaration-function (macro decl)
-  "Process a declaration found in a macro definition.
-This is set as the value of the variable `macro-declaration-function'.
-MACRO is the name of the macro being defined.
-DECL is a list `(declare ...)' containing the declarations.
-The return value of this function is not used."
-  ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons.
-  (let (d)
-    ;; Ignore the first element of `decl' (it's always `declare').
-    (while (setq decl (cdr decl))
-      (setq d (car decl))
-      (cond ((and (consp d) (eq (car d) 'indent))
-            (put macro 'lisp-indent-function (car (cdr d))))
-           ((and (consp d) (eq (car d) 'debug))
-            (put macro 'edebug-form-spec (car (cdr d))))
-           (t
-            (message "Unknown declaration %s" d))))))
-
-(setq macro-declaration-function 'macro-declaration-function)
-
 \f
 ;;;; Lisp language features.
 
@@ -2478,6 +2457,8 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
     (push toggle minor-mode-list))
 
   (unless toggle-fun (setq toggle-fun toggle))
+  (unless (eq toggle-fun toggle)
+    (put toggle :minor-mode-function toggle-fun))
   ;; Add the name to the minor-mode-alist.
   (when name
     (let ((existing (assq toggle minor-mode-alist)))