emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 208102fa47: ; Rename enable-theme and disable-theme hooks


From: Eli Zaretskii
Subject: master 208102fa47: ; Rename enable-theme and disable-theme hooks
Date: Sat, 21 May 2022 09:56:23 -0400 (EDT)

branch: master
commit 208102fa470e3417320062cdb48a9967d80bf092
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Rename enable-theme and disable-theme hooks
    
    * lisp/custom.el (enable-theme-functions)
    (disable-theme-functions): Rename from enable-theme-hook and
    disable-theme-hook.  All users changed.  (Bug#37802)
---
 etc/NEWS       |  2 +-
 lisp/custom.el | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 223f87ebfb..190620619f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1859,7 +1859,7 @@ functions.
 ** Themes
 
 ---
-*** New hooks 'enable-theme-hook' and 'disable-theme-hook'.
+*** New hooks 'enable-theme-functions' and 'disable-theme-functions'.
 These are run after enabling and disabling a theme, respectively.
 
 ---
diff --git a/lisp/custom.el b/lisp/custom.el
index 181711967d..a084304ff8 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1422,16 +1422,16 @@ are not directories are omitted from the expansion."
 
 ;;; Enabling and disabling loaded themes.
 
-(defcustom enable-theme-hook nil
-  "Atypical hook run after a theme has been enabled.
+(defcustom enable-theme-functions nil
+  "Abnormal hook that is run after a theme has been enabled.
 The functions in the hook are called with one parameter -- the
  name of the theme that's been enabled (as a symbol)."
   :type 'hook
   :group 'customize
   :version "29.1")
 
-(defcustom disable-theme-hook nil
-  "Atypical hook run after a theme has been disabled.
+(defcustom disable-theme-functions nil
+  "Abnormal hook that is run after a theme has been disabled.
 The functions in the hook are called with one parameter -- the
  name of the theme that's been disabled (as a symbol)."
   :type 'hook
@@ -1448,7 +1448,7 @@ precedence (after `user') among enabled themes.
 Note that any already-enabled themes remain enabled after this
 function runs.  To disable other themes, use `disable-theme'.
 
-After THEME has been enabled, `enable-theme-hook' is run."
+After THEME has been enabled, runs `enable-theme-functions'."
   (interactive (list (intern
                      (completing-read
                       "Enable custom theme: "
@@ -1498,7 +1498,7 @@ After THEME has been enabled, `enable-theme-hook' is run."
     ;; Give the `user' theme the highest priority.
     (enable-theme 'user))
   ;; Allow callers to react to the enabling.
-  (run-hook-with-args 'enable-theme-hook theme))
+  (run-hook-with-args 'enable-theme-functions theme))
 
 (defcustom custom-enabled-themes nil
   "List of enabled Custom Themes, highest precedence first.
@@ -1545,7 +1545,7 @@ Setting this variable through Customize calls 
`enable-theme' or
   "Disable all variable and face settings defined by THEME.
 See `custom-enabled-themes' for a list of enabled themes.
 
-After THEME has been disabled, `disable-theme-hook' is run."
+After THEME has been disabled, runs `disable-theme-functions'."
   (interactive (list (intern
                      (completing-read
                       "Disable custom theme: "
@@ -1591,7 +1591,7 @@ After THEME has been disabled, `disable-theme-hook' is 
run."
     (setq custom-enabled-themes
           (delq theme custom-enabled-themes))
     ;; Allow callers to react to the disabling.
-    (run-hook-with-args 'disable-theme-hook theme)))
+    (run-hook-with-args 'disable-theme-functions theme)))
 
 ;; Only used if window-system not null.
 (declare-function x-get-resource "frame.c"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]