emacs-devel
[Top][All Lists]
Advanced

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

Make mode-line number display consistent when both line and col numbers


From: Robert Weiner
Subject: Make mode-line number display consistent when both line and col numbers are shown.
Date: Thu, 28 Sep 2017 17:56:50 -0400

When mode-line line numbers are on by themselves, L<line-num> appears.
When mode-line column numbers are on by themselves, C<col-num> appears.
When both are on, (<line-num>,<col-num>) appears.

The latter is inconsistent and always forces the user to remember which is the line and which is the column number.  Fixing this is simple, simply remove the parentheses which are no longer needed and add the prefix character to each number for:  L<line-num>,C<col-num>.  This makes the display perfectly consistent, easier to read and does not take up any more character space.

Patch to Emacs 25.3 included below.  For Emacs 26, 2 lines have to change rather than one.  It is an easy manual fix.

Eli, would you change this for Emacs 26?  It would be nice to have the consistency.

*** bindings-orig.el 2017-09-28 17:48:59.000000000 -0400
--- bindings.el 2017-09-28 17:48:59.000000000 -0400
***************
*** 369,375 ****
      (line-number-mode
       ((column-number-mode
         (10 ,(propertize
!      " (%l,%c)"
       'local-map mode-line-column-line-number-mode-map
       'mouse-face 'mode-line-highlight
       'help-echo "Line number and Column number\n\
--- 369,375 ----
      (line-number-mode
       ((column-number-mode
         (10 ,(propertize
!      " L%l,C%c"
       'local-map mode-line-column-line-number-mode-map
       'mouse-face 'mode-line-highlight
       'help-echo "Line number and Column number\n\


reply via email to

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