Mercurial > emacs
comparison lisp/frame.el @ 11039:c9e2537da847
(other-frame): Don't try to unfocus in a termcap frame.
(frame-notice-user-settings): Skip menu-bar code in a termcap frame.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 16 Mar 1995 21:25:52 +0000 |
parents | f93c3156e05a |
children | 72becffa4b21 |
comparison
equal
deleted
inserted
replaced
11038:f93c3156e05a | 11039:c9e2537da847 |
---|---|
201 ;;; file. Now default-frame-alist and initial-frame-alist contain | 201 ;;; file. Now default-frame-alist and initial-frame-alist contain |
202 ;;; information to which we must react; do what needs to be done. | 202 ;;; information to which we must react; do what needs to be done. |
203 (defun frame-notice-user-settings () | 203 (defun frame-notice-user-settings () |
204 | 204 |
205 ;; Make menu-bar-mode and default-frame-alist consistent. | 205 ;; Make menu-bar-mode and default-frame-alist consistent. |
206 (let ((default (assq 'menu-bar-lines default-frame-alist))) | 206 (if (boundp 'menu-bar-mode) |
207 (if default | 207 (let ((default (assq 'menu-bar-lines default-frame-alist))) |
208 (setq menu-bar-mode (not (eq (cdr default) 0))) | 208 (if default |
209 (setq default-frame-alist | 209 (setq menu-bar-mode (not (eq (cdr default) 0))) |
210 (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0)) | 210 (setq default-frame-alist |
211 default-frame-alist)))) | 211 (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0)) |
212 default-frame-alist))))) | |
212 | 213 |
213 ;; Creating and deleting frames may shift the selected frame around, | 214 ;; Creating and deleting frames may shift the selected frame around, |
214 ;; and thus the current buffer. Protect against that. We don't | 215 ;; and thus the current buffer. Protect against that. We don't |
215 ;; want to use save-excursion here, because that may also try to set | 216 ;; want to use save-excursion here, because that may also try to set |
216 ;; the buffer of the selected window, which fails when the selected | 217 ;; the buffer of the selected window, which fails when the selected |
493 (setq frame (previous-frame frame))) | 494 (setq frame (previous-frame frame))) |
494 (setq arg (1+ arg))) | 495 (setq arg (1+ arg))) |
495 (raise-frame frame) | 496 (raise-frame frame) |
496 (select-frame frame) | 497 (select-frame frame) |
497 (set-mouse-position (selected-frame) (1- (frame-width)) 0) | 498 (set-mouse-position (selected-frame) (1- (frame-width)) 0) |
498 (unfocus-frame))) | 499 (if (fboundp 'unfocus-frame) |
500 (unfocus-frame)))) | |
499 | 501 |
500 ;;;; Frame configurations | 502 ;;;; Frame configurations |
501 | 503 |
502 (defun current-frame-configuration () | 504 (defun current-frame-configuration () |
503 "Return a list describing the positions and states of all frames. | 505 "Return a list describing the positions and states of all frames. |