]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer display-line-numbers over linum in docs and one defcustom
authorStefan Kangas <stefankangas@gmail.com>
Fri, 31 May 2019 23:40:11 +0000 (01:40 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Tue, 27 Aug 2019 00:41:51 +0000 (02:41 +0200)
* doc/misc/efaq.texi: Replace linum with display-line-numbers.
* lisp/progmodes/prog-mode.el (prog-mode-hook): Replace linum-mode
with display-line-numbers-mode in :options.  (Bug#37120)

doc/misc/efaq.texi
lisp/progmodes/prog-mode.el

index df244a71c8ea19806f67826b88c3bef41d1abdb5..e5673daf3a96e08f68c283c2527c6e83b085fcc5 100644 (file)
@@ -1687,11 +1687,21 @@ mode-line-format @key{RET}}) for more information on how to set and use
 this variable.
 
 @cindex Set number capability in @code{vi} emulators
-The @samp{linum} package (distributed with Emacs since version 23.1)
-displays line numbers in the left margin, like the ``set number''
-capability of @code{vi}.  The packages @samp{setnu} and
-@samp{wb-line-number} (not distributed with Emacs) also implement this
-feature.
+The @samp{display-line-numbers} package (added to Emacs in version
+26.1) displays line numbers in the text area, before each line, like
+the ``set number'' capability of @samp{vi}.  Customize the
+buffer-local variable @code{display-line-numbers} to activate this
+optional display.  Alternatively, you can use the
+@code{display-line-numbers-mode} minor mode or the global
+@code{global-display-line-numbers-mode}.  When using these modes,
+customize @code{display-line-numbers-type} with the same value as you
+would use with @code{display-line-numbers}.
+
+There is also the @samp{linum} package (distributed with Emacs since
+version 23.1) which will henceforth become obsolete.  Users and
+developers are encouraged to use @samp{display-line-numbers} instead.
+The packages @samp{setnu} and @samp{wb-line-number} (not distributed
+with Emacs) also implement this feature.
 
 @node Displaying the current file name in the titlebar
 @section How can I modify the titlebar to contain the current file name?
index cb39e62265d921ad0fb6db836dec813a704bd0b6..8d3513bad30f2da96ca50cab73341d14c1b7aab2 100644 (file)
@@ -39,7 +39,8 @@
 (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)
   :group 'prog-mode)