emacs-diffs
[Top][All Lists]
Advanced

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

scratch/so-long 4ff1dbc 6/7: ; * lisp/so-long.el: Minor bug fixes


From: Phil
Subject: scratch/so-long 4ff1dbc 6/7: ; * lisp/so-long.el: Minor bug fixes
Date: Sun, 10 Jan 2021 08:07:00 -0500 (EST)

branch: scratch/so-long
commit 4ff1dbc91dfb6f0dcde8a0656ffd6466cfac8ab0
Author: Phil Sainty <psainty@orcon.net.nz>
Commit: Phil Sainty <psainty@orcon.net.nz>

    ; * lisp/so-long.el: Minor bug fixes
    
    (so-long-disable-minor-modes): Don't call the mode function to disable
    the mode unless it was actually enabled.
    (so-long-restore-minor-modes, so-long-restore-variables): Use the
    remembered list values, which might be different to the defaults.
---
 lisp/so-long.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/so-long.el b/lisp/so-long.el
index e03fe4d..e1085ab 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -1341,14 +1341,15 @@ Calls `so-long-disable-minor-modes' and 
`so-long-override-variables'."
 (defun so-long-disable-minor-modes ()
   "Disable any active minor modes listed in `so-long-minor-modes'."
   (dolist (mode (so-long-original 'so-long-minor-modes))
-    (when (and (boundp mode) mode)
+    (when (and (boundp mode)
+               (symbol-value mode))
       (funcall mode 0))))
 
 (defun so-long-restore-minor-modes ()
   "Restore the minor modes which were disabled.
 
 The modes are enabled in accordance with what was remembered in `so-long'."
-  (dolist (mode so-long-minor-modes)
+  (dolist (mode (so-long-original 'so-long-minor-modes))
     (when (and (so-long-original mode)
                (boundp mode)
                (not (symbol-value mode)))
@@ -1363,7 +1364,7 @@ The modes are enabled in accordance with what was 
remembered in `so-long'."
   "Restore the remembered values for the overridden variables.
 
 The variables are set in accordance with what was remembered in `so-long'."
-  (dolist (ovar so-long-variable-overrides)
+  (dolist (ovar (so-long-original 'so-long-variable-overrides))
     (so-long-restore-variable (car ovar))))
 
 (defun so-long-restore-variable (variable)



reply via email to

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