[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master bd3c6ee: Avoid slow startup in daemon mode when glo
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master bd3c6ee: Avoid slow startup in daemon mode when global-linum-mode is on |
Date: |
Sun, 4 Jun 2017 12:28:34 -0400 (EDT) |
branch: master
commit bd3c6eeca1c69f95ab0c5eea5b542d0334abde68
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid slow startup in daemon mode when global-linum-mode is on
* lisp/linum.el (linum-on): Don't turn on linum-mode in a
non-client frame of a daemon session. (Bug#27210)
---
lisp/linum.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/linum.el b/lisp/linum.el
index 8baa263..9cfb94d 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -112,7 +112,16 @@ Linum mode is a buffer-local minor mode."
(define-globalized-minor-mode global-linum-mode linum-mode linum-on)
(defun linum-on ()
- (unless (minibufferp)
+ (unless (or (minibufferp)
+ ;; Turning linum-mode in the daemon's initial frame
+ ;; could significantly slow down startup, if the buffer
+ ;; in which this is done is large, because Emacs thinks
+ ;; the "window" spans the entire buffer then. This
+ ;; could happen when restoring session via desktop.el,
+ ;; if some large buffer was under linum-mode when
+ ;; desktop was saved. So we disable linum-mode for
+ ;; non-client frames in a daemon session.
+ (and (daemonp) (null (frame-parameter nil 'client))))
(linum-mode 1)))
(defun linum-delete-overlays ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master bd3c6ee: Avoid slow startup in daemon mode when global-linum-mode is on,
Eli Zaretskii <=