summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-06-30 23:19:53 +0300
committerEli Zaretskii <eliz@gnu.org>2017-06-30 23:19:53 +0300
commit1174e53ebb9610dc352c4a5c533d24c935cc1ed9 (patch)
treec840938d3cb311daaf256dbd23921c606fd49a73 /lisp/faces.el
parenta9be5a768b6c06e74a386c474aba8125dfc8ed86 (diff)
downloademacs-1174e53ebb9610dc352c4a5c533d24c935cc1ed9.tar.gz
Improve documentation of faces related to display-line-numbers
* lisp/faces.el (line-number, line-number-current-line): Warn against using non-monospaced fonts.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 3a40dc90081..c3693d16631 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2469,14 +2469,26 @@ If you set `term-file-prefix' to nil, this function does nothing."
(defface line-number
'((t :inherit (shadow default)))
"Face for displaying line numbers.
-This face is used when `display-line-numbers' is non-nil."
+This face is used when `display-line-numbers' is non-nil.
+
+If you customize the font of this face, make sure it is a
+monospaced font, otherwise line numbers will not line up,
+and text lines might move horizontally as you move through
+the buffer."
: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."
+This face is used when `display-line-numbers' is non-nil.
+
+If you customize the font of this face, make sure it is a
+monospaced font, otherwise line numbers will not line up,
+and text lines might move horizontally as you move through
+the buffer. Similarly, making this face's font different
+from that of the `line-number' face could produce such
+unwanted effects."
:version "26.1"
:group 'basic-faces)