emacs-diffs
[Top][All Lists]
Advanced

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

master 4be98d5: Fix problem with the newly introduces `minor-modes' vari


From: Lars Ingebrigtsen
Subject: master 4be98d5: Fix problem with the newly introduces `minor-modes' variable
Date: Sun, 14 Feb 2021 08:43:32 -0500 (EST)

branch: master
commit 4be98d5575d3c61a941907cd7aaf525409d25caa
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix problem with the newly introduces `minor-modes' variable
    
    * lisp/help-fns.el (describe-mode): Apparently buffer-local
    variables take precedence over lexically bound variables?
---
 lisp/help-fns.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 0e2c682..ceb6bc0 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1743,7 +1743,7 @@ documentation for the major and minor modes of that 
buffer."
   ;; don't switch buffers before calling `help-buffer'.
   (with-help-window (help-buffer)
     (with-current-buffer buffer
-      (let (minor-modes)
+      (let (minors)
        ;; Older packages do not register in minor-mode-list but only in
        ;; minor-mode-alist.
        (dolist (x minor-mode-alist)
@@ -1766,19 +1766,19 @@ documentation for the major and minor modes of that 
buffer."
                          fmode)))
                   (push (list fmode pretty-minor-mode
                               (format-mode-line (assq mode minor-mode-alist)))
-                        minor-modes)))))
+                        minors)))))
        ;; Narrowing is not a minor mode, but its indicator is part of
        ;; mode-line-modes.
        (when (buffer-narrowed-p)
-         (push '(narrow-to-region "Narrow" " Narrow") minor-modes))
-       (setq minor-modes
-             (sort minor-modes
+         (push '(narrow-to-region "Narrow" " Narrow") minors))
+       (setq minors
+             (sort minors
                    (lambda (a b) (string-lessp (cadr a) (cadr b)))))
-       (when minor-modes
+       (when minors
          (princ "Enabled minor modes:\n")
          (make-local-variable 'help-button-cache)
          (with-current-buffer standard-output
-           (dolist (mode minor-modes)
+           (dolist (mode minors)
              (let ((mode-function (nth 0 mode))
                    (pretty-minor-mode (nth 1 mode))
                    (indicator (nth 2 mode)))



reply via email to

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