emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/indent-bars 85fcf55464 210/431: Merge branch 'main' int


From: ELPA Syncer
Subject: [elpa] externals/indent-bars 85fcf55464 210/431: Merge branch 'main' into treesit-scope
Date: Mon, 16 Sep 2024 12:59:30 -0400 (EDT)

branch: externals/indent-bars
commit 85fcf55464dddd27b8ae94df64162d8fa8f2eb3b
Merge: ce84791086 09dd1d6f75
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    Merge branch 'main' into treesit-scope
---
 indent-bars.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/indent-bars.el b/indent-bars.el
index 7f669d6b62..5195ef7a32 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1376,10 +1376,11 @@ Adapted from `highlight-indentation-mode'."
   (indent-bars-teardown)
   (indent-bars-setup))
 
-(defun indent-bars-setup-and-remove ()
-  "Setup indent bars and remove from `after-make-frame-functions'."
-  (remove-hook 'after-make-frame-functions #'indent-bars-setup-and-remove)
-  (indent-bars-setup))
+(defun indent-bars-setup-and-remove (frame)
+  "Setup indent bars for FRAME and remove from `after-make-frame-functions'."
+  (when (display-graphic-p frame)
+    (remove-hook 'after-make-frame-functions #'indent-bars-setup-and-remove)
+    (indent-bars-setup)))
 
 (defvar indent-bars-mode)
 ;;;###autoload
@@ -1389,11 +1390,8 @@ Adapted from `highlight-indentation-mode'."
   :group 'indent-bars
   (if indent-bars-mode
       (if (and (daemonp) (not (frame-parameter nil 'client)))
-         (let ((buf (current-buffer))) ;careful with frameless daemon emacs
-           (add-hook 'after-make-frame-functions
-                     (lambda () (with-current-buffer buf
-                                  (indent-bars-setup-and-remove)))
-                     nil t))
+         (add-hook 'after-make-frame-functions
+                   #'indent-bars-setup-and-remove nil t)
        (indent-bars-setup))
     (indent-bars-teardown)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]