]> git.eshelyaron.com Git - emacs.git/commitdiff
(mode-line-frame-identification): Add doc string.
authorRichard M. Stallman <rms@gnu.org>
Wed, 31 Oct 2001 21:57:45 +0000 (21:57 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 31 Oct 2001 21:57:45 +0000 (21:57 +0000)
(mode-line-position, mode-line-modes): New variables.
(mode-line-format): Use mode-line-position for the part
that displays the position-in-buffer info.  Use
mode-line-modes for the part that displays major and minor modes.

lisp/ChangeLog
lisp/bindings.el

index 942bc05927150dbd322a2ddab9fd376485e45054..82e39f447543edb86f39ddc9f3e942fa75a56974 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-31  Richard M. Stallman  <rms@gnu.org>
+
+       * bindings.el (mode-line-frame-identification): Add doc string.
+       (mode-line-position, mode-line-modes): New variables.
+       (mode-line-format): Use mode-line-position for the part
+       that displays the position-in-buffer info.  Use
+       mode-line-modes for the part that displays major and minor modes.
+
 2001-10-31  Sam Steingold  <sds@gnu.org>
 
        * emacs-lisp/debug.el (debugger-make-xrefs): New function.
index 331c9ab8f210ce57669cd717e10cbb0bac6e6432..d52587fda0288e40b656c7e30c06c604ca4a5909 100644 (file)
@@ -183,7 +183,8 @@ Major modes that edit things other than ordinary files may change this
 
 (make-variable-buffer-local 'mode-line-buffer-identification)
 
-(defvar mode-line-frame-identification '("-%F  "))
+(defvar mode-line-frame-identification '("-%F  ")
+  "Mode-line control to describe the current frame.")
 
 (defvar mode-line-process nil "\
 Mode-line control for displaying info on process status.
@@ -219,15 +220,22 @@ Normally nil in most modes, since there is no process to display.")
 
 (make-variable-buffer-local 'mode-line-modified)
 
-(setq-default mode-line-format
-  (let* ((help-echo
-         ;; The multi-line message doesn't work terribly well on the
-         ;; bottom mode line...  Better ideas?
+;; Actual initialization is below.
+(defvar mode-line-position nil
+  "Mode-line control for displaying line number, column number and fraction.")
+
+(defvar mode-line-modes nil
+  "Mode-line control for displaying major and minor modes.")
+
+(let* ((help-echo
+       ;; The multi-line message doesn't work terribly well on the
+       ;; bottom mode line...  Better ideas?
 ;;;      "\
 ;;; mouse-1: select window, mouse-2: delete others, mouse-3: delete,
 ;;; drag-mouse-1: resize, C-mouse-2: split horizontally"
-         "mouse-1: select window, mouse-2: delete others, mouse-3: delete ...")
+         "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete")
         (dashes (propertize "--" 'help-echo help-echo)))
+  (setq-default mode-line-format
     (list
      (propertize "-" 'help-echo help-echo)
      'mode-line-mule-info
@@ -236,17 +244,24 @@ Normally nil in most modes, since there is no process to display.")
      'mode-line-buffer-identification
      (propertize "   " 'help-echo help-echo)
      'global-mode-string
+     'mode-line-modes
+     `(which-func-mode ("" which-func-format ,dashes))
+     'mode-line-position
+     (propertize "-%-" 'help-echo help-echo)))
+
+  (setq-default mode-line-modes
+    (list
      (propertize "   %[(" 'help-echo help-echo)
      '(:eval (mode-line-mode-name)) 'mode-line-process 'minor-mode-alist
      (propertize "%n" 'help-echo "mouse-2: widen"
                 'local-map (make-mode-line-mouse-map
                             'mouse-2 #'mode-line-widen))
-     (propertize ")%]--" 'help-echo help-echo)
-     `(which-func-mode ("" which-func-format ,dashes))
-     `(line-number-mode (,(propertize "L%l" 'help-echo help-echo) ,dashes))
-     `(column-number-mode (,(propertize "C%c" 'help-echo help-echo) ,dashes))
-     `(-3 . ,(propertize "%p" 'help-echo help-echo))
-     (propertize "-%-" 'help-echo help-echo))))
+     (propertize ")%]--" 'help-echo help-echo)))
+
+  (setq-default mode-line-position 
+    `((line-number-mode (,(propertize "L%l" 'help-echo help-echo) ,dashes))
+      (column-number-mode (,(propertize "C%c" 'help-echo help-echo) ,dashes))
+      (-3 . ,(propertize "%p" 'help-echo help-echo)))))
 
 (defvar mode-line-buffer-identification-keymap nil "\
 Keymap for what is displayed by `mode-line-buffer-identification'.")