projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50b446a
)
Allow customizing hooks defined via define-minor-mode
author
Lars Ingebrigtsen
<larsi@gnus.org>
Sat, 19 Sep 2020 15:21:02 +0000
(17:21 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Sat, 19 Sep 2020 15:21:02 +0000
(17:21 +0200)
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow using
Customize on the hooks (bug#10773).
lisp/emacs-lisp/easy-mmode.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/easy-mmode.el
b/lisp/emacs-lisp/easy-mmode.el
index e3eb9294ed6a3bf9082d88ab7a2c0de616675fd0..fdc1233540e95add52715fc106a0f44ae632548d 100644
(file)
--- a/
lisp/emacs-lisp/easy-mmode.el
+++ b/
lisp/emacs-lisp/easy-mmode.el
@@
-335,6
+335,9
@@
or call the function `%s'."))))
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)"
modefun)))
+ ;; Allow using using `M-x customize-variable' on the hook.
+ (put ',hook 'custom-type 'hook)
+ (put ',hook 'standard-value (list nil))
;; Define the minor-mode keymap.
,(unless (symbolp keymap) ;nil is also a symbol.