[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)
- branch scratch/so-long created (now 98cb78f), Phil, 2021/01/10
- scratch/so-long a799d9b 2/7: ; * lisp/so-long.el: Bump to version 1.1, Phil, 2021/01/10
- scratch/so-long 6ed757f 1/7: ; * lisp/so-long.el: Documentation, Phil, 2021/01/10
- scratch/so-long bb5fa1b 4/7: Make `global-so-long-mode' handle unrecognised file types, Phil, 2021/01/10
- scratch/so-long 4ff1dbc 6/7: ; * lisp/so-long.el: Minor bug fixes,
Phil <=
- scratch/so-long 98cb78f 7/7: Support 'preserved' variables and minor modes in `so-long-mode', Phil, 2021/01/10
- scratch/so-long 4c9fc80 3/7: Increase `so-long-threshold' and `so-long-max-lines' defaults, Phil, 2021/01/10
- scratch/so-long b5dd69a 5/7: * lisp/so-long.el (so-long-minor-modes): Add smartparens modes, Phil, 2021/01/10