summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-19 17:21:02 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-19 17:21:02 +0200
commit144bbfc6625c4e5c8a247d05f7a1dc45c2b62553 (patch)
tree6ce995962d9229bf7d5093a2ce5ddf82cf96b457 /lisp/emacs-lisp
parent50b446a6b32166b15939d7285e35f70f1994b276 (diff)
downloademacs-144bbfc6625c4e5c8a247d05f7a1dc45c2b62553.tar.gz
emacs-144bbfc6625c4e5c8a247d05f7a1dc45c2b62553.tar.bz2
emacs-144bbfc6625c4e5c8a247d05f7a1dc45c2b62553.zip
Allow customizing hooks defined via define-minor-mode
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow using Customize on the hooks (bug#10773).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index e3eb9294ed6..fdc1233540e 100644
--- 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.