(define-minor-mode): Never call the mode function using `eval-after-load'.
This commit is contained in:
parent
8a469c7726
commit
f4cb1d8cae
1 changed files with 1 additions and 6 deletions
|
@ -267,12 +267,7 @@ With zero or negative ARG turn mode off.
|
|||
(add-minor-mode ',mode ',lighter
|
||||
,(if keymap keymap-sym
|
||||
`(if (boundp ',keymap-sym)
|
||||
(symbol-value ',keymap-sym))))
|
||||
|
||||
;; If the mode is global, call the function according to the default.
|
||||
,(if globalp
|
||||
`(if (and load-file-name (not (equal ,init-value ,mode)))
|
||||
(eval-after-load load-file-name '(,mode (if ,mode 1 -1))))))))
|
||||
(symbol-value ',keymap-sym)))))))
|
||||
|
||||
;;;
|
||||
;;; make global minor mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue