mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
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.
This commit is contained in:
parent
2c87aab579
commit
f57c710772
@ -90,14 +90,17 @@ the mode is on, set `display-line-numbers' directly."
|
||||
(remove-hook 'pre-command-hook #'display-line-numbers-update-width t)
|
||||
(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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user