bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37120: [PATCH] Prefer display-line-numbers over linum in docs and cu


From: Eli Zaretskii
Subject: bug#37120: [PATCH] Prefer display-line-numbers over linum in docs and custom
Date: Wed, 21 Aug 2019 19:48:38 +0300

> From: Stefan Kangas <address@hidden>
> Date: Tue, 20 Aug 2019 20:18:49 +0200
> Cc: address@hidden
> 
> > >  @cindex Set number capability in @code{vi} emulators
> > > -The @samp{linum} package (distributed with Emacs since version 23.1)
> > > +@samp{display-line-numbers-mode} (added to Emacs in version 26.1)
> > >  displays line numbers in the left margin, like the ``set number''
> > >  capability of @code{vi}.  The packages @samp{setnu} and
> >
> > This is incorrect: display-line-numbers-mode doesn't use the display
> > margin (linum.el did).
> 
> Would "displays line numbers on the left side of the current window"
> be more precise?

I'd prefer "displays line numbers in the text area, before each line".
("Left side" is not entirely accurate, because in R2L paragraphs the
numbers are displayed on the right.)

> > >  (defcustom prog-mode-hook nil
> > >    "Normal hook run when entering programming modes."
> > >    :type 'hook
> > > -  :options '(flyspell-prog-mode abbrev-mode flymake-mode linum-mode
> > > +  :options '(flyspell-prog-mode abbrev-mode flymake-mode
> > > +                                display-line-numbers-mode
> > >                                  prettify-symbols-mode)
> >
> > Hmm... is it reasonable to run prog-mode-hook just because someone
> > turns on line numbers?  It sounds too drastic to me.
> 
> I'm not sure I understand what you mean.  I thought that this just
> means that when running M-x customize-option RET prog-mode-hook RET we
> show display-line-numbers-mode instead of linum-mode as an option.

My point is that neither linum-mode nor display-line-numbers-mode are
for program sources.  But that's not a very important point, so maybe
ignore me.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]