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: Tue, 20 Aug 2019 20:58:44 +0300

> From: Stefan Kangas <address@hidden>
> Date: Tue, 20 Aug 2019 19:26:02 +0200
> 
> NEWS.26 says:
> 
> 'linum-mode' and all similar packages are henceforth becoming obsolete.
> Users and developers are encouraged to switch to this new feature
> [i.e. display-line-numbers-mode] instead.
> 
> This patch updates the FAQ to recommend display-line-numbers-mode over
> linum-mode.  It also changes one defcustom in progmodes in the same
> way.

Thanks, but see the comments below.

> WDYT?  And, if it looks good, should it go to the master branch or emacs-26?

It should go to master.

> PS. I'm not sure if linum.el should also be moved into lisp/obsolete/
> or if that's premature for 27.1.

I think it's still premature.

> --- a/doc/misc/efaq.texi
> +++ b/doc/misc/efaq.texi
> @@ -1687,7 +1687,7 @@ Displaying the current line or column
>  this variable.
>  
>  @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).

>  @samp{wb-line-number} (not distributed with Emacs) also implement this
> diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
> index cb39e62265..8d3513bad3 100644
> --- a/lisp/progmodes/prog-mode.el
> +++ b/lisp/progmodes/prog-mode.el
> @@ -39,7 +39,8 @@ prog-mode
>  (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.





reply via email to

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