comparison lisp/frame.el @ 8056:1c5fd2cdfb36

(frame-notice-user-settings): Make menu-bar-mode and default-frame-alist consistent with each other.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Jun 1994 18:20:55 +0000
parents d15b6dd3bc2e
children 48c81a052cea
comparison
equal deleted inserted replaced
8055:6a0af6085c1a 8056:1c5fd2cdfb36
164 ;;; startup.el calls this function after loading the user's init 164 ;;; startup.el calls this function after loading the user's init
165 ;;; file. Now default-frame-alist and initial-frame-alist contain 165 ;;; file. Now default-frame-alist and initial-frame-alist contain
166 ;;; information to which we must react; do what needs to be done. 166 ;;; information to which we must react; do what needs to be done.
167 (defun frame-notice-user-settings () 167 (defun frame-notice-user-settings ()
168 168
169 ;; Make menu-bar-mode and default-frame-alist consistent.
170 (let ((default (assq 'menu-bar-lines default-frame-alist)))
171 (if default
172 (setq menu-bar-mode (not (eq (cdr default) 0)))
173 (setq default-frame-alist
174 (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0))
175 default-frame-alist))))
176
169 ;; Creating and deleting frames may shift the selected frame around, 177 ;; Creating and deleting frames may shift the selected frame around,
170 ;; and thus the current buffer. Protect against that. We don't 178 ;; and thus the current buffer. Protect against that. We don't
171 ;; want to use save-excursion here, because that may also try to set 179 ;; want to use save-excursion here, because that may also try to set
172 ;; the buffer of the selected window, which fails when the selected 180 ;; the buffer of the selected window, which fails when the selected
173 ;; window is the minibuffer. 181 ;; window is the minibuffer.