comparison lisp/frame.el @ 10557:87b3ab910738

Fix typos.
author Karl Heuer <kwzh@gnu.org>
date Thu, 26 Jan 1995 22:52:10 +0000
parents dd28f1cd68d2
children 132a846eba8e
comparison
equal deleted inserted replaced
10556:fda9e00240b0 10557:87b3ab910738
41 a minibuffer frame on your own, one is created according to 41 a minibuffer frame on your own, one is created according to
42 `minibuffer-frame-alist'. 42 `minibuffer-frame-alist'.
43 43
44 You can specify geometry-related options for just the initial frame 44 You can specify geometry-related options for just the initial frame
45 by setting this variable in your `.emacs' file; however, they won't 45 by setting this variable in your `.emacs' file; however, they won't
46 take affect until Emacs reads `.emacs', which happens after first creating 46 take effect until Emacs reads `.emacs', which happens after first creating
47 the frame. If you want the frame to have the proper geometry as soon 47 the frame. If you want the frame to have the proper geometry as soon
48 as it appears, you need to use this three-step process: 48 as it appears, you need to use this three-step process:
49 * Specify X resources to give the geometry you want. 49 * Specify X resources to give the geometry you want.
50 * Set `default-frame-alist' to override these options so that they 50 * Set `default-frame-alist' to override these options so that they
51 don't affect subsequent frames. 51 don't affect subsequent frames.
69 69
70 (setq pop-up-frame-function 70 (setq pop-up-frame-function
71 (function (lambda () 71 (function (lambda ()
72 (make-frame pop-up-frame-alist)))) 72 (make-frame pop-up-frame-alist))))
73 73
74 (defvar special-display-frame-alist 74 (defvar special-display-frame-alist
75 '((height . 14) (width . 80) (unsplittable . t)) 75 '((height . 14) (width . 80) (unsplittable . t))
76 "*Alist of frame parameters used when creating special frames. 76 "*Alist of frame parameters used when creating special frames.
77 Special frames are used for buffers whose names are in 77 Special frames are used for buffers whose names are in
78 `special-display-buffer-names' and for buffers whose names match 78 `special-display-buffer-names' and for buffers whose names match
79 one of the regular expressions in `special-display-regexps'. 79 one of the regular expressions in `special-display-regexps'.
83 83
84 ;; Display BUFFER in its own frame, reusing an existing window if any. 84 ;; Display BUFFER in its own frame, reusing an existing window if any.
85 ;; Return the window chosen. 85 ;; Return the window chosen.
86 ;; Currently we do not insist on selecting the window within its frame. 86 ;; Currently we do not insist on selecting the window within its frame.
87 ;; If ARGS is an alist, use it as a list of frame parameter specs. 87 ;; If ARGS is an alist, use it as a list of frame parameter specs.
88 ;; If ARGS is a list whose car is a symbol. 88 ;; If ARGS is a list whose car is a symbol,
89 ;; use (car ARGS) as a function to do the work. 89 ;; use (car ARGS) as a function to do the work.
90 ;; Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args. 90 ;; Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args.
91 (defun special-display-popup-frame (buffer &optional args) 91 (defun special-display-popup-frame (buffer &optional args)
92 (if (and args (symbolp (car args))) 92 (if (and args (symbolp (car args)))
93 (apply (car args) buffer (cdr args)) 93 (apply (car args) buffer (cdr args))
122 ;;;; Arrangement of frames at startup 122 ;;;; Arrangement of frames at startup
123 123
124 ;;; 1) Load the window system startup file from the lisp library and read the 124 ;;; 1) Load the window system startup file from the lisp library and read the
125 ;;; high-priority arguments (-q and the like). The window system startup 125 ;;; high-priority arguments (-q and the like). The window system startup
126 ;;; file should create any frames specified in the window system defaults. 126 ;;; file should create any frames specified in the window system defaults.
127 ;;; 127 ;;;
128 ;;; 2) If no frames have been opened, we open an initial text frame. 128 ;;; 2) If no frames have been opened, we open an initial text frame.
129 ;;; 129 ;;;
130 ;;; 3) Once the init file is done, we apply any newly set parameters 130 ;;; 3) Once the init file is done, we apply any newly set parameters
131 ;;; in initial-frame-alist to the frame. 131 ;;; in initial-frame-alist to the frame.
132 132
133 ;; These are now called explicitly at the proper times, 133 ;; These are now called explicitly at the proper times,
134 ;; since that is easier to understand. 134 ;; since that is easier to understand.
135 ;; Actually using hooks within Emacs is bad for future maintenance. --rms. 135 ;; Actually using hooks within Emacs is bad for future maintenance. --rms.
136 ;; (add-hook 'before-init-hook 'frame-initialize) 136 ;; (add-hook 'before-init-hook 'frame-initialize)
137 ;; (add-hook 'window-setup-hook 'frame-notice-user-settings) 137 ;; (add-hook 'window-setup-hook 'frame-notice-user-settings)
138 138
146 146
147 ;;; startup.el calls this function before loading the user's init 147 ;;; startup.el calls this function before loading the user's init
148 ;;; file - if there is no frame with a minibuffer open now, create 148 ;;; file - if there is no frame with a minibuffer open now, create
149 ;;; one to display messages while loading the init file. 149 ;;; one to display messages while loading the init file.
150 (defun frame-initialize () 150 (defun frame-initialize ()
151 151
152 ;; Are we actually running under a window system at all? 152 ;; Are we actually running under a window system at all?
153 (if (and window-system (not noninteractive)) 153 (if (and window-system (not noninteractive))
154 (progn 154 (progn
155 ;; Turn on special-display processing only if there's a window system. 155 ;; Turn on special-display processing only if there's a window system.
156 (setq special-display-function 'special-display-popup-frame) 156 (setq special-display-function 'special-display-popup-frame)
180 ;; so that we won't reapply them in frame-notice-user-settings. 180 ;; so that we won't reapply them in frame-notice-user-settings.
181 ;; It would be wrong to reapply them then, 181 ;; It would be wrong to reapply them then,
182 ;; because that would override explicit user resizing. 182 ;; because that would override explicit user resizing.
183 (setq initial-frame-alist 183 (setq initial-frame-alist
184 (frame-remove-geometry-params initial-frame-alist)))) 184 (frame-remove-geometry-params initial-frame-alist))))
185 ;; At this point, we know that we have a frame open, so we 185 ;; At this point, we know that we have a frame open, so we
186 ;; can delete the terminal frame. 186 ;; can delete the terminal frame.
187 (delete-frame terminal-frame) 187 (delete-frame terminal-frame)
188 (setq terminal-frame nil)) 188 (setq terminal-frame nil))
189 189
190 ;; No, we're not running a window system. Arrange to cause errors. 190 ;; No, we're not running a window system. Arrange to cause errors.
191 (setq frame-creation-function 191 (setq frame-creation-function
192 (function 192 (function
193 (lambda (parameters) 193 (lambda (parameters)
194 (error 194 (error
195 "Can't create multiple frames without a window system")))))) 195 "Can't create multiple frames without a window system"))))))
196 196
197 ;;; startup.el calls this function after loading the user's init 197 ;;; startup.el calls this function after loading the user's init
198 ;;; file. Now default-frame-alist and initial-frame-alist contain 198 ;;; file. Now default-frame-alist and initial-frame-alist contain
199 ;;; information to which we must react; do what needs to be done. 199 ;;; information to which we must react; do what needs to be done.
200 (defun frame-notice-user-settings () 200 (defun frame-notice-user-settings ()
201 201
525 (let ((parameters (assq frame config-alist))) 525 (let ((parameters (assq frame config-alist)))
526 (if parameters 526 (if parameters
527 (progn 527 (progn
528 (modify-frame-parameters 528 (modify-frame-parameters
529 frame 529 frame
530 ;; Since we can't set a frame's minibuffer status, 530 ;; Since we can't set a frame's minibuffer status,
531 ;; we might as well omit the parameter altogether. 531 ;; we might as well omit the parameter altogether.
532 (let* ((parms (nth 1 parameters)) 532 (let* ((parms (nth 1 parameters))
533 (mini (assq 'minibuffer parms))) 533 (mini (assq 'minibuffer parms)))
534 (if mini (setq parms (delq mini parms))) 534 (if mini (setq parms (delq mini parms)))
535 parms)) 535 parms))