aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-03-04 16:55:57 +0100
committerLars Ingebrigtsen2022-03-04 16:55:57 +0100
commit18e25c198f39895438c05ef293789358232dfd76 (patch)
tree6f9716354c3696e509dd594a76e5bf68edfbfb7a
parentcdbc2f9d274a23bcf6cb03046b1e5b4bdcedafb1 (diff)
downloademacs-18e25c198f39895438c05ef293789358232dfd76.tar.gz
emacs-18e25c198f39895438c05ef293789358232dfd76.zip
Improve scroll-bar-mode/default-frame-alist interaction docs
* lisp/scroll-bar.el (scroll-bar-mode): Mention default-frame-alist (bug#54237). * src/frame.c (syms_of_frame): Clarify further that setting this variable may have unintended consequences.
-rw-r--r--lisp/scroll-bar.el7
-rw-r--r--src/frame.c18
2 files changed, 19 insertions, 6 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 3d12723c025..5786a21e88e 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -132,8 +132,11 @@ Setting the variable with a customization buffer also takes effect."
132(define-minor-mode scroll-bar-mode 132(define-minor-mode scroll-bar-mode
133 "Toggle vertical scroll bars on all frames (Scroll Bar mode). 133 "Toggle vertical scroll bars on all frames (Scroll Bar mode).
134 134
135This command applies to all frames that exist and frames to be 135This command applies to all frames that exist, as well as new
136created in the future." 136frames to be created in the future. This is done by altering the
137frame parameters, so if you (re-)set `default-frame-alist' after
138toggling the scroll bars on or off with this command, the scroll
139bars may reappear on new frames."
137 :variable ((get-scroll-bar-mode) 140 :variable ((get-scroll-bar-mode)
138 . (lambda (v) (set-scroll-bar-mode 141 . (lambda (v) (set-scroll-bar-mode
139 (if v (or previous-scroll-bar-mode 142 (if v (or previous-scroll-bar-mode
diff --git a/src/frame.c b/src/frame.c
index b7ff7fd1fc4..b3990ae2aa5 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -6233,14 +6233,24 @@ You can also use a floating number between 0.0 and 1.0. */);
6233 doc: /* Alist of default values for frame creation. 6233 doc: /* Alist of default values for frame creation.
6234These may be set in your init file, like this: 6234These may be set in your init file, like this:
6235 (setq default-frame-alist \\='((width . 80) (height . 55) (menu-bar-lines . 1))) 6235 (setq default-frame-alist \\='((width . 80) (height . 55) (menu-bar-lines . 1)))
6236
6236These override values given in window system configuration data, 6237These override values given in window system configuration data,
6237 including X Windows' defaults database. 6238including X Windows' defaults database.
6239
6240Note that many display-related modes (like `scroll-bar-mode' or
6241`menu-bar-mode') alter `default-frame-alist', so if you set this
6242variable directly, you may be overriding other settings
6243unintentionally. Instead it's often better to use
6244`modify-all-frames-parameters' or push new elements to the front of
6245this alist.
6246
6238For values specific to the first Emacs frame, see `initial-frame-alist'. 6247For values specific to the first Emacs frame, see `initial-frame-alist'.
6248
6239For window-system specific values, see `window-system-default-frame-alist'. 6249For window-system specific values, see `window-system-default-frame-alist'.
6250
6240For values specific to the separate minibuffer frame, see 6251For values specific to the separate minibuffer frame, see
6241 `minibuffer-frame-alist'. 6252`minibuffer-frame-alist'.
6242The `menu-bar-lines' element of the list controls whether new frames 6253
6243 have menu bars; `menu-bar-mode' works by altering this element.
6244Setting this variable does not affect existing frames, only new ones. */); 6254Setting this variable does not affect existing frames, only new ones. */);
6245 Vdefault_frame_alist = Qnil; 6255 Vdefault_frame_alist = Qnil;
6246 6256