diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-19 17:21:02 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-19 17:21:02 +0200 |
commit | 144bbfc6625c4e5c8a247d05f7a1dc45c2b62553 (patch) | |
tree | 6ce995962d9229bf7d5093a2ce5ddf82cf96b457 /lisp/emacs-lisp | |
parent | 50b446a6b32166b15939d7285e35f70f1994b276 (diff) | |
download | emacs-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.el | 3 |
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. |