From 980b4036231398a653c2208d7f44598ac046536e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 31 May 2018 12:33:59 +0200 Subject: emacs: be more clear on when to apply line numbers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'emacs/init.org') diff --git a/emacs/init.org b/emacs/init.org index 5af778a..c303987 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -134,7 +134,9 @@ Relative line numbers support is builtin since GNU Emacs 26.1: #+BEGIN_SRC elisp (if (>= emacs-major-version 26) - (setq display-line-numbers 'relative)) + (progn + (add-hook 'prog-mode-hook 'display-line-numbers-mode) + (setq display-line-numbers-type 'relative))) #+END_SRC ** Basic editing configuration -- cgit v1.2.3