aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-11-15 19:24:52 +0000
committerGerd Moellmann2000-11-15 19:24:52 +0000
commit3df1fda2b69f21e285f84562b4a3063fabebcd4e (patch)
treecfd786938517da9321fc1591126c29e346590e92 /src
parentacb8dc441de3d40270c8fddb9b05710bc90e8828 (diff)
downloademacs-3df1fda2b69f21e285f84562b4a3063fabebcd4e.tar.gz
emacs-3df1fda2b69f21e285f84562b4a3063fabebcd4e.zip
(syms_of_frame_1): Removed; code moved to syms_of_frame.
(Qinhibit_default_face_x_resources): New variable. (syms_of_frame): Initialize it. (Fmodify_frame_parameters): Bind inhibit-default-face-x-resources.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c171
1 files changed, 73 insertions, 98 deletions
diff --git a/src/frame.c b/src/frame.c
index 644e7a5347a..98a9ad7e8bc 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -48,40 +48,6 @@ Boston, MA 02111-1307, USA. */
48#include "dosfns.h" 48#include "dosfns.h"
49#endif 49#endif
50 50
51/* Evaluate this expression to rebuild the section of syms_of_frame
52 that initializes and staticpros the symbols declared below. Note
53 that Emacs 18 has a bug that keeps C-x C-e from being able to
54 evaluate this expression.
55
56(progn
57 ;; Accumulate a list of the symbols we want to initialize from the
58 ;; declarations at the top of the file.
59 (goto-char (point-min))
60 (search-forward "/\*&&& symbols declared here &&&*\/\n")
61 (let (symbol-list)
62 (while (looking-at "Lisp_Object \\(Q[a-z_]+\\)")
63 (setq symbol-list
64 (cons (buffer-substring (match-beginning 1) (match-end 1))
65 symbol-list))
66 (forward-line 1))
67 (setq symbol-list (nreverse symbol-list))
68 ;; Delete the section of syms_of_... where we initialize the symbols.
69 (search-forward "\n /\*&&& init symbols here &&&*\/\n")
70 (let ((start (point)))
71 (while (looking-at "^ Q")
72 (forward-line 2))
73 (kill-region start (point)))
74 ;; Write a new symbol initialization section.
75 (while symbol-list
76 (insert (format " %s = intern (\"" (car symbol-list)))
77 (let ((start (point)))
78 (insert (substring (car symbol-list) 1))
79 (subst-char-in-region start (point) ?_ ?-))
80 (insert (format "\");\n staticpro (&%s);\n" (car symbol-list)))
81 (setq symbol-list (cdr symbol-list)))))
82 */
83
84/*&&& symbols declared here &&&*/
85Lisp_Object Qframep; 51Lisp_Object Qframep;
86Lisp_Object Qframe_live_p; 52Lisp_Object Qframe_live_p;
87Lisp_Object Qheight; 53Lisp_Object Qheight;
@@ -104,72 +70,12 @@ Lisp_Object Qbuffer_list;
104Lisp_Object Qtitle; 70Lisp_Object Qtitle;
105Lisp_Object Qdisplay_type; 71Lisp_Object Qdisplay_type;
106Lisp_Object Qbackground_mode; 72Lisp_Object Qbackground_mode;
73Lisp_Object Qinhibit_default_face_x_resources;
107 74
108Lisp_Object Vterminal_frame; 75Lisp_Object Vterminal_frame;
109Lisp_Object Vdefault_frame_alist; 76Lisp_Object Vdefault_frame_alist;
110Lisp_Object Vmouse_position_function; 77Lisp_Object Vmouse_position_function;
111 78
112static void
113syms_of_frame_1 ()
114{
115 /*&&& init symbols here &&&*/
116 Qframep = intern ("framep");
117 staticpro (&Qframep);
118 Qframe_live_p = intern ("frame-live-p");
119 staticpro (&Qframe_live_p);
120 Qheight = intern ("height");
121 staticpro (&Qheight);
122 Qicon = intern ("icon");
123 staticpro (&Qicon);
124 Qminibuffer = intern ("minibuffer");
125 staticpro (&Qminibuffer);
126 Qmodeline = intern ("modeline");
127 staticpro (&Qmodeline);
128 Qname = intern ("name");
129 staticpro (&Qname);
130 Qonly = intern ("only");
131 staticpro (&Qonly);
132 Qunsplittable = intern ("unsplittable");
133 staticpro (&Qunsplittable);
134 Qmenu_bar_lines = intern ("menu-bar-lines");
135 staticpro (&Qmenu_bar_lines);
136 Qtool_bar_lines = intern ("tool-bar-lines");
137 staticpro (&Qtool_bar_lines);
138 Qwidth = intern ("width");
139 staticpro (&Qwidth);
140 Qx = intern ("x");
141 staticpro (&Qx);
142 Qw32 = intern ("w32");
143 staticpro (&Qw32);
144 Qpc = intern ("pc");
145 staticpro (&Qpc);
146 Qmac = intern ("mac");
147 staticpro (&Qmac);
148 Qvisible = intern ("visible");
149 staticpro (&Qvisible);
150 Qbuffer_predicate = intern ("buffer-predicate");
151 staticpro (&Qbuffer_predicate);
152 Qbuffer_list = intern ("buffer-list");
153 staticpro (&Qbuffer_list);
154 Qtitle = intern ("title");
155 staticpro (&Qtitle);
156 Qdisplay_type = intern ("display-type");
157 staticpro (&Qdisplay_type);
158 Qbackground_mode = intern ("background-mode");
159 staticpro (&Qbackground_mode);
160
161 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
162 "Alist of default values for frame creation.\n\
163These may be set in your init file, like this:\n\
164 (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))\n\
165These override values given in window system configuration data,\n\
166 including X Windows' defaults database.\n\
167For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
168For values specific to the separate minibuffer frame, see\n\
169 `minibuffer-frame-alist'.\n\
170The `menu-bar-lines' element of the list controls whether new frames\n\
171 have menu bars; `menu-bar-mode' works by altering this element.");
172 Vdefault_frame_alist = Qnil;
173} 79}
174 80
175static void 81static void
@@ -2214,6 +2120,15 @@ enabled such bindings for that variable with `make-variable-frame-local'.")
2214{ 2120{
2215 FRAME_PTR f; 2121 FRAME_PTR f;
2216 register Lisp_Object tail, prop, val; 2122 register Lisp_Object tail, prop, val;
2123 int count = BINDING_STACK_SIZE ();
2124
2125 /* Bind this to t to inhibit initialization of the default face from
2126 X resources in face-set-after-frame-default. If we don't inhibit
2127 this, modifying the `font' frame parameter, for example, while
2128 there is a `default.attributeFont' X resource, won't work,
2129 because `default's font is reset to the value of the X resource
2130 and that resets the `font' frame parameter. */
2131 specbind (Qinhibit_default_face_x_resources, Qt);
2217 2132
2218 if (EQ (frame, Qnil)) 2133 if (EQ (frame, Qnil))
2219 frame = selected_frame; 2134 frame = selected_frame;
@@ -2262,7 +2177,7 @@ enabled such bindings for that variable with `make-variable-frame-local'.")
2262 } 2177 }
2263 } 2178 }
2264 2179
2265 return Qnil; 2180 return unbind_to (count, Qnil);
2266} 2181}
2267 2182
2268DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, 2183DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height,
@@ -2476,9 +2391,67 @@ the rightmost or bottommost possible position (that stays within the screen).")
2476void 2391void
2477syms_of_frame () 2392syms_of_frame ()
2478{ 2393{
2479 syms_of_frame_1 (); 2394 Qframep = intern ("framep");
2395 staticpro (&Qframep);
2396 Qframe_live_p = intern ("frame-live-p");
2397 staticpro (&Qframe_live_p);
2398 Qheight = intern ("height");
2399 staticpro (&Qheight);
2400 Qicon = intern ("icon");
2401 staticpro (&Qicon);
2402 Qminibuffer = intern ("minibuffer");
2403 staticpro (&Qminibuffer);
2404 Qmodeline = intern ("modeline");
2405 staticpro (&Qmodeline);
2406 Qname = intern ("name");
2407 staticpro (&Qname);
2408 Qonly = intern ("only");
2409 staticpro (&Qonly);
2410 Qunsplittable = intern ("unsplittable");
2411 staticpro (&Qunsplittable);
2412 Qmenu_bar_lines = intern ("menu-bar-lines");
2413 staticpro (&Qmenu_bar_lines);
2414 Qtool_bar_lines = intern ("tool-bar-lines");
2415 staticpro (&Qtool_bar_lines);
2416 Qwidth = intern ("width");
2417 staticpro (&Qwidth);
2418 Qx = intern ("x");
2419 staticpro (&Qx);
2420 Qw32 = intern ("w32");
2421 staticpro (&Qw32);
2422 Qpc = intern ("pc");
2423 staticpro (&Qpc);
2424 Qmac = intern ("mac");
2425 staticpro (&Qmac);
2426 Qvisible = intern ("visible");
2427 staticpro (&Qvisible);
2428 Qbuffer_predicate = intern ("buffer-predicate");
2429 staticpro (&Qbuffer_predicate);
2430 Qbuffer_list = intern ("buffer-list");
2431 staticpro (&Qbuffer_list);
2432 Qtitle = intern ("title");
2433 staticpro (&Qtitle);
2434 Qdisplay_type = intern ("display-type");
2435 staticpro (&Qdisplay_type);
2436 Qbackground_mode = intern ("background-mode");
2437 staticpro (&Qbackground_mode);
2480 2438
2481 staticpro (&Vframe_list); 2439 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
2440 "Alist of default values for frame creation.\n\
2441These may be set in your init file, like this:\n\
2442 (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))\n\
2443These override values given in window system configuration data,\n\
2444 including X Windows' defaults database.\n\
2445For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
2446For values specific to the separate minibuffer frame, see\n\
2447 `minibuffer-frame-alist'.\n\
2448The `menu-bar-lines' element of the list controls whether new frames\n\
2449 have menu bars; `menu-bar-mode' works by altering this element.");
2450 Vdefault_frame_alist = Qnil;
2451
2452 Qinhibit_default_face_x_resources
2453 = intern ("inhibit-default-face-x-resources");
2454 staticpro (&Qinhibit_default_face_x_resources);
2482 2455
2483 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, 2456 DEFVAR_LISP ("terminal-frame", &Vterminal_frame,
2484 "The initial frame-object, which represents Emacs's stdout."); 2457 "The initial frame-object, which represents Emacs's stdout.");
@@ -2506,6 +2479,8 @@ this variable doesn't necessarily say anything meaningful about the\n\
2506current set of frames, or where the minibuffer is currently being\n\ 2479current set of frames, or where the minibuffer is currently being\n\
2507displayed."); 2480displayed.");
2508 2481
2482 staticpro (&Vframe_list);
2483
2509 defsubr (&Sactive_minibuffer_window); 2484 defsubr (&Sactive_minibuffer_window);
2510 defsubr (&Sframep); 2485 defsubr (&Sframep);
2511 defsubr (&Sframe_live_p); 2486 defsubr (&Sframe_live_p);