summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-07-11 18:16:36 +0300
committerEli Zaretskii <eliz@gnu.org>2017-07-11 18:16:36 +0300
commitd014a5e15c1110af77e7a96f06ccd0f0cafb099f (patch)
tree511a47194dd94c2551e99d7f5d9a968d7762588f /lisp/faces.el
parent10b876b25b5c65014c5d7f996ae3368ea8fd11b2 (diff)
downloademacs-d014a5e15c1110af77e7a96f06ccd0f0cafb099f.tar.gz
Use fixed-pitch font for display-line-numbers
* lisp/faces.el (line-number): Use a fixed-pitch font by default, even if the default face uses a variable-pitch font. Reported by James Cloos <cloos@jhcloos.com>.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index c3693d16631..e073ed266c0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2465,9 +2465,12 @@ If you set `term-file-prefix' to nil, this function does nothing."
:version "21.1"
:group 'basic-faces)
-;; Definition stolen from linum.el.
+;; Definition originally stolen from linum.el.
+;; The monospace part is so we don't accidentally display numbers
+;; using a variable-pitch font just because the default face uses
+;; such a font.
(defface line-number
- '((t :inherit (shadow default)))
+ '((t :inherit (shadow default) :family "Monospace Serif"))
"Face for displaying line numbers.
This face is used when `display-line-numbers' is non-nil.