comparison lisp/frame.el @ 1974:94e4f619080b

These changes were actually made by Richard; I stole his RCS lock. * frame.el (initial-frame-alist, minibuffer-frame-alist, pop-up-frame-alist, new-frame): Doc fixes. * frame.el (set-pointer-color): Renamed to set-mouse-color. * frame.el (set-border-color): New function.
author Jim Blandy <jimb@redhat.com>
date Tue, 02 Mar 1993 07:06:47 +0000
parents 436edc3e74f6
children ca6059bb1d6f
comparison
equal deleted inserted replaced
1973:3a08dacd8bfb 1974:94e4f619080b
30 30
31 ;;; The initial value given here for this must ask for a minibuffer. 31 ;;; The initial value given here for this must ask for a minibuffer.
32 ;;; There must always exist a frame with a minibuffer, and after we 32 ;;; There must always exist a frame with a minibuffer, and after we
33 ;;; delete the terminal frame, this will be the only frame. 33 ;;; delete the terminal frame, this will be the only frame.
34 (defvar initial-frame-alist '((minibuffer . t)) 34 (defvar initial-frame-alist '((minibuffer . t))
35 "Alist of values used when creating the initial emacs text frame. 35 "Alist of frame parameters for creating the initial X window frame.
36 These may be set in your init file, like this: 36 You can set this in your `.emacs' file; for example,
37 (setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55))) 37 (setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55)))
38 If this requests a frame without a minibuffer, and you do not create a 38 If the value calls for a frame without a minibuffer, and you do not create a
39 minibuffer frame on your own, one will be created, according to 39 minibuffer frame on your own, one is created according to
40 `minibuffer-frame-alist'. 40 `minibuffer-frame-alist'.
41 These supercede the values given in frame-default-alist.") 41 Parameters specified here supersede the values given in
42 `default-frame-alist'.")
42 43
43 (defvar minibuffer-frame-alist '((width . 80) (height . 2)) 44 (defvar minibuffer-frame-alist '((width . 80) (height . 2))
44 "Alist of values to apply to a minibuffer frame. 45 "Alist of frame parameters for initially creating a minibuffer frame.
45 These may be set in your init file, like this: 46 You can set this in your `.emacs' file; for example,
46 (setq minibuffer-frame-alist 47 (setq minibuffer-frame-alist
47 '((top . 1) (left . 1) (width . 80) (height . 2))) 48 '((top . 1) (left . 1) (width . 80) (height . 2)))
48 These supercede the values given in default-frame-alist.") 49 Parameters specified here supersede the values given in
50 `default-frame-alist'.")
49 51
50 (defvar pop-up-frame-alist nil 52 (defvar pop-up-frame-alist nil
51 "Alist of values used when creating pop-up frames. 53 "Alist of frame parameters used when creating pop-up frames.
52 Pop-up frames are used for completions, help, and the like. 54 Pop-up frames are used for completions, help, and the like.
53 This variable can be set in your init file, like this: 55 This variable can be set in your init file, like this:
54 (setq pop-up-frame-alist '((width . 80) (height . 20))) 56 (setq pop-up-frame-alist '((width . 80) (height . 20)))
55 These supercede the values given in default-frame-alist.") 57 These supercede the values given in `default-frame-alist'.")
56 58
57 (setq pop-up-frame-function 59 (setq pop-up-frame-function
58 (function (lambda () 60 (function (lambda ()
59 (new-frame pop-up-frame-alist)))) 61 (new-frame pop-up-frame-alist))))
60 62
239 241
240 Optional argument PARAMETERS is an alist of parameters for the new 242 Optional argument PARAMETERS is an alist of parameters for the new
241 frame. Specifically, PARAMETERS is a list of pairs, each having one 243 frame. Specifically, PARAMETERS is a list of pairs, each having one
242 of the following forms: 244 of the following forms:
243 245
244 (name . STRING) - The frame should be named STRING. 246 \(name . STRING) - The frame should be named STRING.
245 247
246 (height . NUMBER) - The frame should be NUMBER text lines high. If 248 \(height . NUMBER) - The frame should be NUMBER text lines high. If
247 this parameter is present, the width parameter must also be 249 this parameter is present, the width parameter must also be
248 given. 250 given.
249 251
250 (width . NUMBER) - The frame should be NUMBER characters in width. 252 \(width . NUMBER) - The frame should be NUMBER characters in width.
251 If this parameter is present, the height parameter must also 253 If this parameter is present, the height parameter must also
252 be given. 254 be given.
253 255
254 (minibuffer . t) - the frame should have a minibuffer 256 \(minibuffer . t) - the frame should have a minibuffer
255 (minibuffer . none) - the frame should have no minibuffer 257 \(minibuffer . none) - the frame should have no minibuffer
256 (minibuffer . only) - the frame should contain only a minibuffer 258 \(minibuffer . only) - the frame should contain only a minibuffer
257 (minibuffer . WINDOW) - the frame should use WINDOW as its minibuffer window. 259 \(minibuffer . WINDOW) - the frame should use WINDOW as its minibuffer window.
258 260
259 (NAME . VALUE), specifying the parameter and the value it should have. 261 The documentation for the function `x-create-frame' describes
260 NAME should be one of the following symbols: 262 additional frame parameters that Emacs recognizes for X window frames."
261 name VALUE
262
263 The documentation for the function x-create-frame describes
264 additional frame parameters that Emacs will recognize when running
265 under the X Window System."
266 (interactive) 263 (interactive)
267 (funcall frame-creation-function parameters)) 264 (funcall frame-creation-function parameters))
268 265
269 (defun filtered-frame-list (predicate) 266 (defun filtered-frame-list (predicate)
270 "Return a list of all live frames which satisfy PREDICATE." 267 "Return a list of all live frames which satisfy PREDICATE."
354 When called interactively, prompt for the name of the color to use." 351 When called interactively, prompt for the name of the color to use."
355 (interactive "sColor: ") 352 (interactive "sColor: ")
356 (modify-frame-parameters (selected-frame) 353 (modify-frame-parameters (selected-frame)
357 (list (cons 'cursor-color color-name)))) 354 (list (cons 'cursor-color color-name))))
358 355
359 (defun set-pointer-color (color-name) 356 (defun set-mouse-color (color-name)
360 "Set the color of the mouse pointer of the selected frame to COLOR. 357 "Set the color of the mouse pointer of the selected frame to COLOR.
361 When called interactively, prompt for the name of the color to use." 358 When called interactively, prompt for the name of the color to use."
362 (interactive "sColor: ") 359 (interactive "sColor: ")
363 (modify-frame-parameters (selected-frame) 360 (modify-frame-parameters (selected-frame)
364 (list (cons 'mouse-color color-name)))) 361 (list (cons 'mouse-color color-name))))
365 362
366 (defun toggle-auto-raise (arg) 363 (defun set-border-color (color-name)
364 "Set the color of the border of the selected frame to COLOR.
365 When called interactively, prompt for the name of the color to use."
366 (interactive "sColor: ")
367 (modify-frame-parameters (selected-frame)
368 (list (cons 'border-color color-name))))
369
370 (defun auto-raise-mode (arg)
367 "Toggle whether or not the selected frame should auto-raise. 371 "Toggle whether or not the selected frame should auto-raise.
368 With arg, turn auto-raise mode on if and only if arg is positive." 372 With arg, turn auto-raise mode on if and only if arg is positive."
369 (interactive "P") 373 (interactive "P")
370 (if (null arg) 374 (if (null arg)
371 (setq arg 375 (setq arg
372 (if (cdr (assq 'auto-raise (frame-parameters (selected-frame)))) 376 (if (cdr (assq 'auto-raise (frame-parameters (selected-frame))))
373 -1 1))) 377 -1 1)))
374 (modify-frame-parameters (selected-frame) 378 (modify-frame-parameters (selected-frame)
375 (list (cons 'auto-raise (> arg 0))))) 379 (list (cons 'auto-raise (> arg 0)))))
376 380
377 (defun toggle-auto-lower (arg) 381 (defun auto-lower-mode (arg)
378 "Toggle whether or not the selected frame should auto-lower. 382 "Toggle whether or not the selected frame should auto-lower.
379 With arg, turn auto-lower mode on if and only if arg is positive." 383 With arg, turn auto-lower mode on if and only if arg is positive."
380 (interactive "P") 384 (interactive "P")
381 (if (null arg) 385 (if (null arg)
382 (setq arg 386 (setq arg