Commit 61f2bcd7 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(frame-notice-user-settings): Make tool-bar-mode and

default-frame-alist consistent.
parent 31d929e5
...@@ -221,13 +221,22 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." ...@@ -221,13 +221,22 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args."
"Act on user's init file settings of frame parameters. "Act on user's init file settings of frame parameters.
React to settings of `default-frame-alist', `initial-frame-alist' there." React to settings of `default-frame-alist', `initial-frame-alist' there."
;; Make menu-bar-mode and default-frame-alist consistent. ;; Make menu-bar-mode and default-frame-alist consistent.
(if (boundp 'menu-bar-mode) (when (boundp 'menu-bar-mode)
(let ((default (assq 'menu-bar-lines default-frame-alist))) (let ((default (assq 'menu-bar-lines default-frame-alist)))
(if default (if default
(setq menu-bar-mode (not (eq (cdr default) 0))) (setq menu-bar-mode (not (eq (cdr default) 0)))
(setq default-frame-alist (setq default-frame-alist
(cons (cons 'menu-bar-lines (if menu-bar-mode 1 0)) (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0))
default-frame-alist))))) default-frame-alist)))))
;; Make tool-bar-mode and default-frame-alist consistent.
(when (boundp 'tool-bar-mode)
(let ((default (assq 'tool-bar-lines default-frame-alist)))
(if default
(setq tool-bar-mode (not (eq (cdr default) 0)))
(setq default-frame-alist
(cons (cons 'tool-bar-lines (if tool-bar-mode 1 0))
default-frame-alist)))))
;; Creating and deleting frames may shift the selected frame around, ;; Creating and deleting frames may shift the selected frame around,
;; and thus the current buffer. Protect against that. We don't ;; and thus the current buffer. Protect against that. We don't
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment