]> git.eshelyaron.com Git - emacs.git/commitdiff
(menu-bar-options-save): Take care of line-number-mode and
authorPavel Janík <Pavel@Janik.cz>
Sat, 9 Feb 2002 13:56:42 +0000 (13:56 +0000)
committerPavel Janík <Pavel@Janik.cz>
Sat, 9 Feb 2002 13:56:42 +0000 (13:56 +0000)
column-number-mode variables.
(menu-bar-showhide-menu): New menu-items "Show Line Number" and "Show
Column Number" in "Show/Hide" menu.

lisp/menu-bar.el

index 10314e193fbf8e11e08d1a7f8e8ad8ec852b6f52..fc35b2dc97463113e30b74389da28bb85e9b8c48 100644 (file)
@@ -550,7 +550,8 @@ Do the same for the keys of the same name."
                   case-fold-search truncate-lines show-paren-mode
                   transient-mark-mode global-font-lock-mode
                   current-language-environment default-input-method
-                  default-frame-alist display-time-mode))
+                  default-frame-alist display-time-mode
+                  line-number-mode column-number-mode))
       (when (customize-mark-to-save elt)
        (setq need-save t)))
     ;; We only want to save text-mode-hook after adding or removing auto fill.
@@ -563,9 +564,9 @@ Do the same for the keys of the same name."
     (and (featurep 'saveplace)
         (customize-mark-to-save 'save-place)
         (setq need-save t))
-    (and(featurep 'uniquify)
-       (customize-mark-to-save 'uniquify-buffer-name-style)
-       (setq need-save t))
+    (and (featurep 'uniquify)
+        (customize-mark-to-save 'uniquify-buffer-name-style)
+        (setq need-save t))
     ;; Save if we changed anything.
     (when need-save
       (custom-save-all))))
@@ -581,6 +582,19 @@ Do the same for the keys of the same name."
 
 (defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide"))
 
+(define-key menu-bar-showhide-menu [column-number-mode]
+  (menu-bar-make-toggle column-number-mode column-number-mode
+                       "Show Column Number" "Column number mode %s"
+                       "Show the current column number in the mode-line"))
+
+(define-key menu-bar-showhide-menu [line-number-mode]
+  (menu-bar-make-toggle line-number-mode line-number-mode
+                       "Show Line Number" "Line number mode %s"
+                       "Show the current line number in the mode-line"))
+
+(define-key menu-bar-showhide-menu [linecolumn-separator]
+  '("--"))
+
 (defun showhide-date-time ()
   "Toggle whether to show date and time in the mode-line."
   (interactive)