comparison src/frame.c @ 2681:f15523a6da7a

[xemacs-hg @ 2005-03-24 12:17:51 by aidan] Move to XEmacs for X11 app class, frame name.
author aidan
date Thu, 24 Mar 2005 12:18:02 +0000
parents 166ed8151e62
children 6fa9919a9a0b
comparison
equal deleted inserted replaced
2680:b26d8b5d0d30 2681:f15523a6da7a
35 #include "faces.h" 35 #include "faces.h"
36 #include "frame-impl.h" 36 #include "frame-impl.h"
37 #include "glyphs.h" 37 #include "glyphs.h"
38 #include "gutter.h" 38 #include "gutter.h"
39 #include "menubar.h" 39 #include "menubar.h"
40 #include "process.h" /* for egetenv */
40 #include "redisplay.h" 41 #include "redisplay.h"
41 #include "scrollbar.h" 42 #include "scrollbar.h"
42 #include "toolbar.h" 43 #include "toolbar.h"
43 #include "window.h" 44 #include "window.h"
44 45
490 if (!NILP (name)) 491 if (!NILP (name))
491 { 492 {
492 CHECK_STRING (name); 493 CHECK_STRING (name);
493 frame_name_is_defaulted = 0; 494 frame_name_is_defaulted = 0;
494 } 495 }
495 else if (STRINGP (Vdefault_frame_name)) 496 else if (!initialized)
496 name = Vdefault_frame_name; 497 {
497 else 498 /* We leave Vdefault_frame_name alone here so that it'll remain Qnil
498 name = build_string ("emacs"); 499 in the dumped executable, and we can choose it at runtime. */
500 name = build_string("XEmacs");
501 }
502 else if (NILP (Vdefault_frame_name))
503 {
504 if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS"))
505 {
506 Vdefault_frame_name = build_string ("emacs");
507 }
508 else
509 {
510 Vdefault_frame_name = build_string ("XEmacs");
511 }
512 }
513
514 if (NILP(name) && STRINGP(Vdefault_frame_name))
515 {
516 name = Vdefault_frame_name;
517 }
499 518
500 if (!NILP (Fstring_match (make_string ((const Ibyte *) "\\.", 2), name, 519 if (!NILP (Fstring_match (make_string ((const Ibyte *) "\\.", 2), name,
501 Qnil, Qnil))) 520 Qnil, Qnil)))
502 syntax_error (". not allowed in frame names", name); 521 syntax_error (". not allowed in frame names", name);
503 522
3813 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* 3832 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /*
3814 The default name to assign to newly-created frames. 3833 The default name to assign to newly-created frames.
3815 This can be overridden by arguments to `make-frame'. This must be a string. 3834 This can be overridden by arguments to `make-frame'. This must be a string.
3816 This is used primarily for picking up X resources, and is *not* the title 3835 This is used primarily for picking up X resources, and is *not* the title
3817 of the frame. (See `frame-title-format'.) 3836 of the frame. (See `frame-title-format'.)
3837
3838 Previous to 21.5.21, this defaulted to `emacs'; since that release, it has
3839 defaulted to `XEmacs'. In the short term you can restore the old default by
3840 setting the environment variable USE_EMACS_AS_DEFAULT_APPLICATION_CLASS
3841 (which does affect the frame name, despite what it's called) to some value
3842 before starting XEmacs, but this is deprecated.
3818 */ ); 3843 */ );
3819 #ifndef INFODOCK 3844 Vdefault_frame_name = Qnil;
3820 Vdefault_frame_name = build_string ("emacs");
3821 #else
3822 Vdefault_frame_name = build_string ("InfoDock");
3823 #endif
3824 3845
3825 DEFVAR_LISP ("default-frame-plist", &Vdefault_frame_plist /* 3846 DEFVAR_LISP ("default-frame-plist", &Vdefault_frame_plist /*
3826 Plist of default values for frame creation, other than the first one. 3847 Plist of default values for frame creation, other than the first one.
3827 These may be set in your init file, like this: 3848 These may be set in your init file, like this:
3828 3849