emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/mentor df7fe38715 3/6: Improve automatic disabling of line


From: ELPA Syncer
Subject: [nongnu] elpa/mentor df7fe38715 3/6: Improve automatic disabling of line numbers
Date: Thu, 22 Sep 2022 07:59:12 -0400 (EDT)

branch: elpa/mentor
commit df7fe38715db647f51d53dfc249f8907cc3ca965
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Improve automatic disabling of line numbers
---
 mentor.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mentor.el b/mentor.el
index 2a632e1037..af622aa4ee 100644
--- a/mentor.el
+++ b/mentor.el
@@ -471,7 +471,12 @@ Misc commands:
   (setq mentor-current-view mentor-default-view
         mentor-items (make-hash-table :test 'equal))
   (add-hook 'post-command-hook #'mentor-post-command-hook t t)
-  (when (bound-and-true-p global-linum-mode)
+  ;; No line numbers.
+  (when (and (fboundp 'display-line-numbers-mode)
+             (bound-and-true-p global-display-line-numbers-mode))
+    (display-line-numbers-mode -1))
+  (when (and (fboundp 'linum-mode)
+             (bound-and-true-p global-linum-mode))
     (linum-mode -1))
   (when (and (fboundp 'nlinum-mode)
              (bound-and-true-p global-nlinum-mode))



reply via email to

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