diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-07-23 15:41:51 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-07-23 15:41:51 -0400 |
commit | f57c7107727a615e217f1c245c400722c1422870 (patch) | |
tree | 1546ccab83c24989d1478cbcaf4f3eea14a64020 /lisp/display-line-numbers.el | |
parent | 2c87aab57946b95d67b664259f30e64468d08544 (diff) | |
download | emacs-f57c7107727a615e217f1c245c400722c1422870.tar.gz |
Use a named function for global minor mode turn-on argument
* lisp/display-line-numbers.el (turn-on-display-line-numbers-mode):
New function.
(global-display-line-numbers-mode): Use it.
Diffstat (limited to 'lisp/display-line-numbers.el')
-rw-r--r-- | lisp/display-line-numbers.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el index 0351fc2871d..d0c1750cf3a 100644 --- a/lisp/display-line-numbers.el +++ b/lisp/display-line-numbers.el @@ -91,13 +91,16 @@ the mode is on, set `display-line-numbers' directly." (setq display-line-numbers nil))) ;;;###autoload +(defun turn-on-display-line-numbers-mode () + "Turn on `display-line-numbers-mode'." + (unless (or (minibufferp) + ;; taken from linum.el + (and (daemonp) (null (frame-parameter nil 'client)))) + (display-line-numbers-mode))) + +;;;###autoload (define-globalized-minor-mode global-display-line-numbers-mode - display-line-numbers-mode - (lambda () - (unless (or (minibufferp) - ;; taken from linum.el - (and (daemonp) (null (frame-parameter nil 'client)))) - (display-line-numbers-mode)))) + display-line-numbers-mode turn-on-display-line-numbers-mode) (provide 'display-line-numbers) |