annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1 ;;; frame.el --- multi-frame management independent of window systems.
658
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
2
1769
c77a852fda5f * frame.el (frame-notice-user-settings): Don't try to delete the
Jim Blandy <jimb@redhat.com>
parents: 1475
diff changeset
3 ;;;; Copyright (C) 1990, 1992, 1993 Free Software Foundation, Inc.
846
20674ae6bf52 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 827
diff changeset
4
793
6fb68a1460a6 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 777
diff changeset
5 ;; Maintainer: FSF
811
e694e0879463 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 806
diff changeset
6 ;; Keywords: internal
793
6fb68a1460a6 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 777
diff changeset
7
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 ;;; This file is part of GNU Emacs.
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 ;;;
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10 ;;; GNU Emacs is free software; you can redistribute it and/or modify
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 ;;; it under the terms of the GNU General Public License as published by
806
d42e1151eed8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 793
diff changeset
12 ;;; the Free Software Foundation; either version 2, or (at your option)
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 ;;; any later version.
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 ;;;
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 ;;; GNU Emacs is distributed in the hope that it will be useful,
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 ;;; GNU General Public License for more details.
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 ;;;
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 ;;; You should have received a copy of the GNU General Public License
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 ;;; along with GNU Emacs; see the file COPYING. If not, write to
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23
793
6fb68a1460a6 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 777
diff changeset
24 ;;; Code:
6fb68a1460a6 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 777
diff changeset
25
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
26 (defvar frame-creation-function nil
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
27 "Window-system dependent function to call to create a new frame.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
28 The window system startup file should set this to its frame creation
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 function, which should take an alist of parameters as its argument.")
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
31 ;;; The initial value given here for this must ask for a minibuffer.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
32 ;;; There must always exist a frame with a minibuffer, and after we
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
33 ;;; delete the terminal frame, this will be the only frame.
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
34 (defvar initial-frame-alist '((minibuffer . t))
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
35 "Alist of frame parameters for creating the initial X window frame.
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
36 You can set this in your `.emacs' file; for example,
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
37 (setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55)))
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
38 If the value calls for a frame without a minibuffer, and you do not create a
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
39 minibuffer frame on your own, one is created according to
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
40 `minibuffer-frame-alist'.
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
41 Parameters specified here supersede the values given in
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
42 `default-frame-alist'.")
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
44 (defvar minibuffer-frame-alist '((width . 80) (height . 2))
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
45 "Alist of frame parameters for initially creating a minibuffer frame.
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
46 You can set this in your `.emacs' file; for example,
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
47 (setq minibuffer-frame-alist
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
48 '((top . 1) (left . 1) (width . 80) (height . 2)))
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
49 Parameters specified here supersede the values given in
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
50 `default-frame-alist'.")
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
52 (defvar pop-up-frame-alist nil
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
53 "Alist of frame parameters used when creating pop-up frames.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
54 Pop-up frames are used for completions, help, and the like.
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 This variable can be set in your init file, like this:
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
56 (setq pop-up-frame-alist '((width . 80) (height . 20)))
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
57 These supercede the values given in `default-frame-alist'.")
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
59 (setq pop-up-frame-function
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (function (lambda ()
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
61 (new-frame pop-up-frame-alist))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
64 ;;;; Arrangement of frames at startup
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 ;;; 1) Load the window system startup file from the lisp library and read the
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 ;;; high-priority arguments (-q and the like). The window system startup
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
68 ;;; file should create any frames specified in the window system defaults.
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 ;;;
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
70 ;;; 2) If no frames have been opened, we open an initial text frame.
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 ;;;
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 ;;; 3) Once the init file is done, we apply any newly set parameters
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
73 ;;; in initial-frame-alist to the frame.
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
75 (add-hook 'before-init-hook 'frame-initialize)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
76 (add-hook 'window-setup-hook 'frame-notice-user-settings)
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
78 ;;; If we create the initial frame, this is it.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
79 (defvar frame-initial-frame nil)
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 ;;; startup.el calls this function before loading the user's init
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
82 ;;; file - if there is no frame with a minibuffer open now, create
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 ;;; one to display messages while loading the init file.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
84 (defun frame-initialize ()
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 ;; Are we actually running under a window system at all?
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 (if (and window-system (not noninteractive))
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
88 (progn
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
89 ;; If there is no frame with a minibuffer besides the terminal
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
90 ;; frame, then we need to create the opening frame. Make sure
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
91 ;; it has a minibuffer, but let initial-frame-alist omit the
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
92 ;; minibuffer spec.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
93 (or (delq terminal-frame (minibuffer-frame-list))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
94 (setq default-minibuffer-frame
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
95 (setq frame-initial-frame
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
96 (new-frame initial-frame-alist))))
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
97
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
98 ;; At this point, we know that we have a frame open, so we
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
99 ;; can delete the terminal frame.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
100 (delete-frame terminal-frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
101 (setq terminal-frame nil))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 ;; No, we're not running a window system. Arrange to cause errors.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
104 (setq frame-creation-function
404
f6c751f07c4a *** empty log message ***
Michael I. Bushnell <mib@gnu.org>
parents: 394
diff changeset
105 (function
f6c751f07c4a *** empty log message ***
Michael I. Bushnell <mib@gnu.org>
parents: 394
diff changeset
106 (lambda (parameters)
f6c751f07c4a *** empty log message ***
Michael I. Bushnell <mib@gnu.org>
parents: 394
diff changeset
107 (error
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
108 "Can't create multiple frames without a window system"))))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
110 ;;; startup.el calls this function after loading the user's init
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
111 ;;; file. Now default-frame-alist and initial-frame-alist contain
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
112 ;;; information to which we must react; do what needs to be done.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
113 (defun frame-notice-user-settings ()
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
114
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
115 ;; Creating and deleting frames may shift the selected frame around,
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
116 ;; and thus the current buffer. Protect against that. We don't
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
117 ;; want to use save-excursion here, because that may also try to set
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
118 ;; the buffer of the selected window, which fails when the selected
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
119 ;; window is the minibuffer.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
120 (let ((old-buffer (current-buffer)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
121
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
122 ;; If the initial frame is still around, apply initial-frame-alist
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
123 ;; and default-frame-alist to it.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
124 (if (frame-live-p frame-initial-frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
125
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
126 ;; The initial frame we create above always has a minibuffer.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
127 ;; If the user wants to remove it, or make it a minibuffer-only
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
128 ;; frame, then we'll have to delete the current frame and make a
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
129 ;; new one; you can't remove or add a root window to/from an
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
130 ;; existing frame.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
131 ;;
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
132 ;; NOTE: default-frame-alist was nil when we created the
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
133 ;; existing frame. We need to explicitly include
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
134 ;; default-frame-alist in the parameters of the screen we
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
135 ;; create here, so that its new value, gleaned from the user's
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
136 ;; .emacs file, will be applied to the existing screen.
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
137 (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
138 (assq 'minibuffer default-frame-alist)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
139 '(minibuffer . t)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
140 t))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
141 ;; Create the new frame.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
142 (let ((new
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
143 (new-frame
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
144 (append initial-frame-alist
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
145 default-frame-alist
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
146 (frame-parameters frame-initial-frame)))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
147
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
148 ;; The initial frame, which we are about to delete, may be
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
149 ;; the only frame with a minibuffer. If it is, create a
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
150 ;; new one.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
151 (or (delq frame-initial-frame (minibuffer-frame-list))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
152 (new-frame (append minibuffer-frame-alist
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
153 '((minibuffer . only)))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
154
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
155 ;; If the initial frame is serving as a surrogate
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
156 ;; minibuffer frame for any frames, we need to wean them
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
157 ;; onto a new frame. The default-minibuffer-frame
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
158 ;; variable must be handled similarly.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
159 (let ((users-of-initial
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
160 (filtered-frame-list
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
161 (function (lambda (frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
162 (and (not (eq frame frame-initial-frame))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
163 (eq (window-frame
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
164 (minibuffer-window frame))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
165 frame-initial-frame)))))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
166 (if (or users-of-initial
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
167 (eq default-minibuffer-frame frame-initial-frame))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
168
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
169 ;; Choose an appropriate frame. Prefer frames which
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
170 ;; are only minibuffers.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
171 (let* ((new-surrogate
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
172 (car
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
173 (or (filtered-frame-list
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
174 (function
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
175 (lambda (frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
176 (eq (cdr (assq 'minibuffer
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
177 (frame-parameters frame)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
178 'only))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
179 (minibuffer-frame-list))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
180 (new-minibuffer (minibuffer-window new-surrogate)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
181
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
182 (if (eq default-minibuffer-frame frame-initial-frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
183 (setq default-minibuffer-frame new-surrogate))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
184
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
185 ;; Wean the frames using frame-initial-frame as
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
186 ;; their minibuffer frame.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
187 (mapcar
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
188 (function
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
189 (lambda (frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
190 (modify-frame-parameters
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
191 frame (list (cons 'minibuffer new-minibuffer)))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
192 users-of-initial))))
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
193
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
194 ;; Redirect events enqueued at this frame to the new frame.
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
195 ;; Is this a good idea?
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
196 (redirect-frame-focus frame-initial-frame new)
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
197
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
198 ;; Finally, get rid of the old frame.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
199 (delete-frame frame-initial-frame))
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
200
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
201 ;; Otherwise, we don't need all that rigamarole; just apply
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
202 ;; the new parameters.
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
203 (modify-frame-parameters frame-initial-frame
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
204 (append initial-frame-alist
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
205 default-frame-alist))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
207 ;; Restore the original buffer.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
208 (set-buffer old-buffer)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
209
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
210 ;; Make sure the initial frame can be GC'd if it is ever deleted.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
211 (makunbound 'frame-initial-frame)))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
214 ;;;; Creation of additional frames, and other frame miscellanea
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
216 ;;; Return some frame other than the current frame, creating one if
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
217 ;;; neccessary. Note that the minibuffer frame, if separate, is not
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
218 ;;; considered (see next-frame).
827
731cb9bcbad0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 826
diff changeset
219 (defun get-other-frame ()
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
220 (let ((s (if (equal (next-frame (selected-frame)) (selected-frame))
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
221 (new-frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
222 (next-frame (selected-frame)))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 s))
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
225 (defun next-multiframe-window ()
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
226 "Select the next window, regardless of which frame it is on."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227 (interactive)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 (select-window (next-window (selected-window)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 (> (minibuffer-depth) 0)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 t)))
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
232 (defun previous-multiframe-window ()
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
233 "Select the previous window, regardless of which frame it is on."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 (interactive)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 (select-window (previous-window (selected-window)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 (> (minibuffer-depth) 0)
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 t)))
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
239 (defun new-frame (&optional parameters)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
240 "Create a new frame, displaying the current buffer.
539
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 428
diff changeset
241
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
242 Optional argument PARAMETERS is an alist of parameters for the new
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
243 frame. Specifically, PARAMETERS is a list of pairs, each having one
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
244 of the following forms:
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
245
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
246 \(name . STRING) - The frame should be named STRING.
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
247
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
248 \(height . NUMBER) - The frame should be NUMBER text lines high. If
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
249 this parameter is present, the width parameter must also be
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
250 given.
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
251
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
252 \(width . NUMBER) - The frame should be NUMBER characters in width.
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
253 If this parameter is present, the height parameter must also
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
254 be given.
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
255
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
256 \(minibuffer . t) - the frame should have a minibuffer
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
257 \(minibuffer . none) - the frame should have no minibuffer
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
258 \(minibuffer . only) - the frame should contain only a minibuffer
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
259 \(minibuffer . WINDOW) - the frame should use WINDOW as its minibuffer window.
542
119ba212b686 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 539
diff changeset
260
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
261 The documentation for the function `x-create-frame' describes
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
262 additional frame parameters that Emacs recognizes for X window frames."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 (interactive)
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
264 (funcall frame-creation-function parameters))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
266 (defun filtered-frame-list (predicate)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
267 "Return a list of all live frames which satisfy PREDICATE."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
268 (let ((frames (frame-list))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
269 good-frames)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
270 (while (consp frames)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
271 (if (funcall predicate (car frames))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
272 (setq good-frames (cons (car frames) good-frames)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
273 (setq frames (cdr frames)))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
274 good-frames))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
275
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
276 (defun minibuffer-frame-list ()
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
277 "Return a list of all frames with their own minibuffers."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
278 (filtered-frame-list
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
279 (function (lambda (frame)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
280 (eq frame (window-frame (minibuffer-window frame)))))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
281
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
282
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
283 ;;;; Frame configurations
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
284
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
285 (defun current-frame-configuration ()
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
286 "Return a list describing the positions and states of all frames.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
287 Each element is a list of the form (FRAME ALIST WINDOW-CONFIG), where
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
288 FRAME is a frame object, ALIST is an association list specifying
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
289 some of FRAME's parameters, and WINDOW-CONFIG is a window
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
290 configuration object for FRAME."
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
291 (mapcar (function
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
292 (lambda (frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
293 (list frame
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
294 (frame-parameters frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
295 (current-window-configuration frame))))
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
296 (frame-list)))
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
297
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
298 (defun set-frame-configuration (configuration)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
299 "Restore the frames to the state described by CONFIGURATION.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
300 Each frame listed in CONFIGURATION has its position, size, window
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
301 configuration, and other parameters set as specified in CONFIGURATION."
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
302 (let (frames-to-delete)
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
303 (mapcar (function
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
304 (lambda (frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
305 (let ((parameters (assq frame configuration)))
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
306 (if parameters
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
307 (progn
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
308 (modify-frame-parameters frame (nth 1 parameters))
756
0276f8eb306f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
309 (set-window-configuration (nth 2 parameters)))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
310 (setq frames-to-delete (cons frame frames-to-delete))))))
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
311 (frame-list))
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
312 (mapcar 'delete-frame frames-to-delete)))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
314
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
315 ;;;; Convenience functions for accessing and interactively changing
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
316 ;;;; frame parameters.
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317
826
e9b9a1cff2c9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 811
diff changeset
318 (defun frame-height (&optional frame)
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
319 "Return number of lines available for display on FRAME.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
320 If FRAME is omitted, describe the currently selected frame."
826
e9b9a1cff2c9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 811
diff changeset
321 (cdr (assq 'height (frame-parameters frame))))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
322
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
323 (defun frame-width (&optional frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
324 "Return number of columns available for display on FRAME.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
325 If FRAME is omitted, describe the currently selected frame."
826
e9b9a1cff2c9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 811
diff changeset
326 (cdr (assq 'width (frame-parameters frame))))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
327
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328 (defun set-default-font (font-name)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
329 "Set the font of the selected frame to FONT.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
330 When called interactively, prompt for the name of the font to use."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331 (interactive "sFont name: ")
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
332 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
333 (list (cons 'font font-name))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
335 (defun set-background-color (color-name)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
336 "Set the background color of the selected frame to COLOR.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
337 When called interactively, prompt for the name of the color to use."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 (interactive "sColor: ")
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
339 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
340 (list (cons 'background-color color-name))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
342 (defun set-foreground-color (color-name)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
343 "Set the foreground color of the selected frame to COLOR.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
344 When called interactively, prompt for the name of the color to use."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 (interactive "sColor: ")
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
346 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
347 (list (cons 'foreground-color color-name))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 (defun set-cursor-color (color-name)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
350 "Set the text cursor color of the selected frame to COLOR.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
351 When called interactively, prompt for the name of the color to use."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 (interactive "sColor: ")
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
353 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
354 (list (cons 'cursor-color color-name))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
356 (defun set-mouse-color (color-name)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
357 "Set the color of the mouse pointer of the selected frame to COLOR.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
358 When called interactively, prompt for the name of the color to use."
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 (interactive "sColor: ")
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
360 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
361 (list (cons 'mouse-color color-name))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
363 (defun set-border-color (color-name)
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
364 "Set the color of the border of the selected frame to COLOR.
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
365 When called interactively, prompt for the name of the color to use."
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
366 (interactive "sColor: ")
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
367 (modify-frame-parameters (selected-frame)
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
368 (list (cons 'border-color color-name))))
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
369
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
370 (defun auto-raise-mode (arg)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
371 "Toggle whether or not the selected frame should auto-raise.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
372 With arg, turn auto-raise mode on if and only if arg is positive."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
373 (interactive "P")
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
374 (if (null arg)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
375 (setq arg
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
376 (if (cdr (assq 'auto-raise (frame-parameters (selected-frame))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
377 -1 1)))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
378 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
379 (list (cons 'auto-raise (> arg 0)))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380
1974
94e4f619080b These changes were actually made by Richard; I stole his RCS lock.
Jim Blandy <jimb@redhat.com>
parents: 1881
diff changeset
381 (defun auto-lower-mode (arg)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
382 "Toggle whether or not the selected frame should auto-lower.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
383 With arg, turn auto-lower mode on if and only if arg is positive."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
384 (interactive "P")
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
385 (if (null arg)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
386 (setq arg
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
387 (if (cdr (assq 'auto-lower (frame-parameters (selected-frame))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
388 -1 1)))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
389 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
390 (list (cons 'auto-lower (> arg 0)))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
391
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
392 (defun toggle-vertical-scroll-bar (arg)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
393 "Toggle whether or not the selected frame has vertical scrollbars.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
394 With arg, turn vertical scrollbars on if and only if arg is positive."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
395 (interactive "P")
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
396 (if (null arg)
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
397 (setq arg
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
398 (if (cdr (assq 'vertical-scrollbars
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
399 (frame-parameters (selected-frame))))
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
400 -1 1)))
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
401 (modify-frame-parameters (selected-frame)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
402 (list (cons 'vertical-scrollbars (> arg 0)))))
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
403
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
404 (defun toggle-horizontal-scroll-bar (arg)
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
405 "Toggle whether or not the selected frame has horizontal scrollbars.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
406 With arg, turn horizontal scrollbars on if and only if arg is positive.
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
407 Horizontal scrollbars aren't implemented yet."
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
408 (interactive "P")
1881
436edc3e74f6 (frame-initialize): Fix error syntax.
Richard M. Stallman <rms@gnu.org>
parents: 1863
diff changeset
409 (error "Horizontal scroll bars aren't implemented yet"))
1863
6f55c76b5789 * frame.el: Clean up initialization code.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
410
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
411
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
412 ;;;; Aliases for backward compatibility with Emacs 18.
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
413 (fset 'screen-height 'frame-height)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
414 (fset 'screen-width 'frame-width)
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
415
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
416 (defun set-screen-width (cols &optional pretend)
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
417 "Obsolete function to change the size of the screen to COLS columns.\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
418 Optional second arg non-nil means that redisplay should use COLS columns\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
419 but that the idea of the actual width of the frame should not be changed.\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
420 This function is provided only for compatibility with Emacs 18; new code\n\
1475
2596132752ff Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 1113
diff changeset
421 should use `set-frame-width instead'."
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
422 (set-frame-width (selected-frame) cols pretend))
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
423
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
424 (defun set-screen-height (lines &optional pretend)
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
425 "Obsolete function to change the height of the screen to LINES lines.\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
426 Optional second arg non-nil means that redisplay should use LINES lines\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
427 but that the idea of the actual height of the screen should not be changed.\n\
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
428 This function is provided only for compatibility with Emacs 18; new code\n\
1475
2596132752ff Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 1113
diff changeset
429 should use `set-frame-width' instead."
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
430 (set-frame-height (selected-frame) lines pretend))
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
431
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
432 (make-obsolete 'screen-height 'frame-height)
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
433 (make-obsolete 'screen-width 'frame-width)
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
434 (make-obsolete 'set-screen-width 'set-frame-width)
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 950
diff changeset
435 (make-obsolete 'set-screen-height 'set-frame-height)
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
436
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
437
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
438 ;;;; Key bindings
727
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 705
diff changeset
439 (defvar ctl-x-5-map (make-sparse-keymap)
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
440 "Keymap for frame commands.")
727
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 705
diff changeset
441 (fset 'ctl-x-5-prefix ctl-x-5-map)
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 705
diff changeset
442 (define-key ctl-x-map "5" 'ctl-x-5-prefix)
394
5bd386d1a1cc Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
443
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
444 (define-key ctl-x-5-map "2" 'new-frame)
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
445 (define-key ctl-x-5-map "0" 'delete-frame)
584
4cd7543be581 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 542
diff changeset
446
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
447 (provide 'frame)
658
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
448
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
449 ;;; frame.el ends here