From d5799ce6667a2c6dc77b4c2e0456263a79970bb5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 18 Nov 2023 12:02:25 +0200 Subject: [PATCH] ; 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. --- lisp/progmodes/elixir-ts-mode.el | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.2