summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-06-24 15:45:23 +0300
committerEli Zaretskii <eliz@gnu.org>2017-06-24 15:45:23 +0300
commit71a7294d0a775a8969ec077eb3633da6bdad7c62 (patch)
tree7ba8cad1e5ace7421e0412db94e184e82e0bc42b /lisp/faces.el
parentfa5e84cccd31cf94074255180d6ff3a44d4f8f89 (diff)
downloademacs-71a7294d0a775a8969ec077eb3633da6bdad7c62.tar.gz
Support a separate face for displaying the current line's number
* lisp/faces.el (line-number-current-line): New face. * src/xdisp.c (syms_of_xdisp) <line-number-current-line>: New symbol. (try_window_id, try_cursor_movement): Disable these optimizations when the line-number-current-line face is different from line-number face. (maybe_produce_line_number): Display the current line in the line-number-current-line face, if it's different from line-number.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index ac2d210a32f..3a40dc90081 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2473,6 +2473,13 @@ This face is used when `display-line-numbers' is non-nil."
:version "26.1"
:group 'basic-faces)
+(defface line-number-current-line
+ '((t :inherit line-number))
+ "Face for displaying the current line number.
+This face is used when `display-line-numbers' is non-nil."
+ :version "26.1"
+ :group 'basic-faces)
+
(defface escape-glyph
'((((background dark)) :foreground "cyan")
;; See the comment in minibuffer-prompt for