Use fixed-pitch font for display-line-numbers
authorEli Zaretskii <eliz@gnu.org>
Tue, 11 Jul 2017 15:16:36 +0000 (18:16 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 11 Jul 2017 15:16:36 +0000 (18:16 +0300)
* 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>.

lisp/faces.el

index c3693d16631de8f544ba7ecf178cf0149db2dc41..e073ed266c0c1aefc2939f241fb31323b89a9dc7 100644 (file)
@@ -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.