From: Eli Zaretskii Date: Sat, 18 Nov 2023 10:02:25 +0000 (+0200) Subject: ; Add commentary for exposing a mode hook to Custom X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5799ce6667a2c6dc77b4c2e0456263a79970bb5;p=emacs.git ; Add commentary for exposing a mode hook to Custom * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook): Add commentary about the reasons for exposing the hook to Custom, per the discussion in bug#67207. --- diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index ad7c599edb1..c687ed9d06b 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -74,6 +74,11 @@ :safe 'integerp :group 'elixir-ts) +;; 'define-derived-mode' doesn't expose the generated mode hook +;; variable to Custom, because we are not smart enough to provide the +;; ':options' for hook variables. Also, some packages modify hook +;; variables. The below is done because users of this mode explicitly +;; requested the hook to be customizable via Custom. (defcustom elixir-ts-mode-hook nil "Hook run after entering `elixir-ts-mode'." :type 'hook