]> git.earman.xyz Git - emacsinit.git/commitdiff
Make the check for graphics (& thus the call to scroll-bar-mode) happen on frame...
authorrush <rearman@r717.net>
Wed, 16 Sep 2026 12:30:13 +0000 (08:30 -0400)
committerrush <rearman@r717.net>
Wed, 16 Sep 2026 12:30:59 +0000 (08:30 -0400)
This makes it so that a client running can properly set the mode, even if
client frames are in the terminal.

init.el

diff --git a/init.el b/init.el
index 8286657b7e986f3202a2acfcc94f76c6469f8574..160275a5156ffd3ae1203a779d0627aae88d3f2c 100644 (file)
--- a/init.el
+++ b/init.el
@@ -840,11 +840,17 @@ If in org-mode, call `org-end-of-line' first."
   (progn\r
     (menu-bar-mode -1)\r
     (tool-bar-mode -1)))\r
-(set-scroll-bar-mode (if (eq system-type 'windows-nt) nil 'left))\r
+\r
+(add-hook 'after-make-frame-functions\r
+         (lambda ()\r
+           (when (display-graphic-p)\r
+             (set-scroll-bar-mode (if (eq system-type 'windows-nt)\r
+                                      nil\r
+                                    'left)))))\r
 \r
 (setq frame-title-format "%b"\r
       mouse-prefer-closest-glyph t\r
-      mouse-1-click-follows-link nil\r
+      mouse-1-click-follows-link ()\r
       focus-follows-mouse t\r
       mouse-autoselect-window -0.25)\r
 \r