all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26552: [patch] nlinum margin width calculation (emacs <25)
@ 2017-04-17 21:26 Christophe Rhodes
  2017-04-18 16:14 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Rhodes @ 2017-04-17 21:26 UTC (permalink / raw)
  To: 26552

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

Hi,

I think the calculation that nlinum-mode does to guess the margin size
in the absence of font width information (in emacs versions less than
25) uses the wrong bit of font information: the pixel size, rather than
the font height.  Trivial patch below, which fixes the problem for me.

Best wishes,

Christophe


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nlinum.diff --]
[-- Type: text/x-diff, Size: 384 bytes --]

--- nlinum.el~	2017-04-17 20:41:35.595122970 +0100
+++ nlinum.el	2017-04-17 21:46:37.713053714 +0100
@@ -71,7 +71,7 @@
   (nlinum--setup-windows))
 
 (defun nlinum--face-height (face)
-  (aref (font-info (face-font face)) 2))
+  (aref (font-info (face-font face)) 3))
 
 (defun nlinum--face-width (face)        ;New info only in Emacs>=25.
   (let ((fi (font-info (face-font face))))

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-04 14:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-17 21:26 bug#26552: [patch] nlinum margin width calculation (emacs <25) Christophe Rhodes
2017-04-18 16:14 ` Eli Zaretskii
2017-04-18 18:04   ` Christophe Rhodes
2017-04-22  8:33     ` Christophe Rhodes
2017-04-22 10:19       ` Eli Zaretskii
2017-04-23 13:38         ` Stefan Monnier
2017-11-04 14:39           ` Noam Postavsky

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.