diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-06-17 17:42:44 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-06-17 17:42:44 +0300 |
commit | 7277c0fca7dab9f1b311c3eba5c42fd17acc3593 (patch) | |
tree | 6426512a85cc8a16bd274bb93eaf857f440e40db /lisp/cus-start.el | |
parent | daf78963ee96484df1ecb0c10e7c0040d7b544a5 (diff) | |
download | emacs-7277c0fca7dab9f1b311c3eba5c42fd17acc3593.tar.gz |
Finish up native display of line numbers
* src/xdisp.c (maybe_produce_line_number): Produce a blank before
the number, for R2L rows. Increment 'g' in the loop even if
glyph_row is NULL. Accept 2nd argument FORCE and produce the
line-number glyphs if it is non-zero.
(move_it_in_display_line_to): Account for the space taken by the
line-number glyphs. Call maybe_produce_line_number with 2nd
argument non-zero.
(set_cursor_from_row): Fix calculation of cursor X coordinate in
R2L rows with display-produced glyphs at the beginning.
(syms_of_xdisp) <line-number>: New face symbol.
<relative, display-line-width>: New symbols.
(maybe_produce_line_number): Use the line-number face for
displaying line numbers. Support relative line-number display.
Support user-defined width for displaying line numbers.
(try_cursor_movement, try_window_id): Disable these optimizations
when displaying relative line numbers.
* src/dispextern.h (struct it): New member 'pt_lnum'.
* lisp/faces.el (line-number): New face.
* lisp/cus-start.el (standard): Provide customization forms for
display-line-numbers and display-line-width.
* lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
turn display-line-numbers on and off.
* etc/NEWS: Document the new feature.
Diffstat (limited to 'lisp/cus-start.el')
-rw-r--r-- | lisp/cus-start.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 744fe7f69ee..0fe41d7c3ea 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -584,6 +584,22 @@ since it could result in memory overflow and make Emacs crash." (const :tag "Grow only" :value grow-only)) "25.1") (display-raw-bytes-as-hex display boolean "26.1") + (display-line-numbers display + (choice + (const :tag "Off (nil)" :value nil) + (const :tag "Absolute line numbers" + :value t) + (const :tag "Relative line numbers" + :value relative)) + "26.1") + (display-line-width display + (choice + (const :tag "Dynamically computed" + :value nil) + (integer :menu-tag "Fixed number of columns" + :value 2 + :format "%v")) + "26.1") ;; xfaces.c (scalable-fonts-allowed display boolean "22.1") ;; xfns.c |