bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28396: 26.0.50; display-line-numbers not saved by Save Options


From: Glenn Morris
Subject: bug#28396: 26.0.50; display-line-numbers not saved by Save Options
Date: Tue, 21 Nov 2017 19:44:05 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Eli Zaretskii wrote:

>   emacs -Q
>   Click Options in the menu bar
>   Select Show/Hide->Line Numbers For All Lines->Global Line Numbers Mode
>   Click Options->Save Options
>
> The result is that the setting of global-display-line-numbers-mode is
> not saved on the init file.

commit daa959e (HEAD, origin/emacs-26, emacs-26)
Date:   Tue Nov 21 19:42:32 2017 -0500

    * lisp/menu-bar.el (menu-bar-options-save):
    Add global-display-line-numbers-mode.  (Bug#28396)

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 972f84e..9ff3de1 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -669,7 +669,8 @@ menu-bar-options-save
   (let ((need-save nil))
     ;; These are set with menu-bar-make-mm-toggle, which does not
     ;; put on a customized-value property.
-    (dolist (elt '(line-number-mode column-number-mode size-indication-mode
+    (dolist (elt '(global-display-line-numbers-mode
+                  line-number-mode column-number-mode size-indication-mode
                   cua-mode show-paren-mode transient-mark-mode
                   blink-cursor-mode display-time-mode display-battery-mode
                   ;; These are set by other functions that don't set


> Note that the solution should also save the sub-mode, when the user
> selects, say, Relative Line Numbers.

Buffer-local variables like display-line-numbers don't play well with
Customize.





reply via email to

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