GNU bug report logs -
#28844
26.0.90; display-line-numbers-mode should call window-configuration-change-hook
Previous Next
Reported by: Paul Rankin <hello <at> paulwrankin.com>
Date: Sun, 15 Oct 2017 07:57:01 UTC
Severity: minor
Found in version 26.0.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, 16 Oct 2017, at 02:59 PM, Alex wrote:
> Actually, I'd recommend (boundp 'display-line-numbers), since the
> feature `display-line-numbers' isn't loaded automatically in Emacs. It
> should be noted that `display-line-numbers-mode' is just a minor mode
> wrapper around the variable `display-line-numbers', which actually does
> the work.
>
> This also means that the hook `display-line-numbers-hook' isn't actually
> enough to determine whether or not line numbers have been toggled (since
> one can just toggle the variable instead). I'd say its main use is in
> user configurations.
>
> To see if line numbers are present in a buffer (and to make it
> compatible with older Emacsen), you should use something like:
>
> (bound-and-true-p display-line-numbers)
Sweet, thanks! I’ve encountered another bug with this mode #28855, so I think until it gets its house in order, the best thing to go with is:
(if (bound-and-true-p display-line-numbers) (display-line-numbers-mode 0))
I’ve just discovered that linum-mode.el has been fixed to respect existing margins, so big love & thanks to whoever did that work. So, if linum-mode can be a good lisp citizen, so too can display-line-numbers-mode!
This bug report was last modified 7 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.