;;; startup.el --- process XEmacs shell arguments ;; Copyright (C) 1985-1986, 1990, 1992-1997 Free Software Foundation, Inc. ;; Copyright (c) 1993, 1994 Sun Microsystems, Inc. ;; Copyright (C) 1995 Board of Trustees, University of Illinois ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; XEmacs is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Synched up with: FSF 19.34. ;;; Commentary: ;; This file is dumped with XEmacs. ;; -batch, -t, and -nw are processed by main() in emacs.c and are ;; never seen by lisp code. ;; -version and -help are special-cased as well: they imply -batch, ;; but are left on the list for lisp code to process. ;;; Code: (setq top-level '(normal-top-level)) (defvar command-line-processed nil "t once command line has been processed") (defconst startup-message-timeout 12000) ; More or less disable the timeout (defconst splash-frame-timeout 7) ; interval between splash frame elements (defconst inhibit-startup-message nil "*Non-nil inhibits the initial startup message. This is for use in your personal init file, once you are familiar with the contents of the startup message.") ;; #### FSFmacs randomness ;;(defconst inhibit-startup-echo-area-message nil ;; "*Non-nil inhibits the initial startup echo area message. ;;Inhibition takes effect only if your `.emacs' file contains ;;a line of this form: ;; (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") ;;If your `.emacs' file is byte-compiled, use the following form instead: ;; (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) ;;Thus, someone else using a copy of your `.emacs' file will see ;;the startup message unless he personally acts to inhibit it.") (defconst inhibit-default-init nil "*Non-nil inhibits loading the `default' library.") (defvar command-line-args-left nil "List of command-line args not yet processed.") ; bound by `command-line' (defvar command-line-default-directory nil "Default directory to use for command line arguments. This is normally copied from `default-directory' when XEmacs starts.") (defvar before-init-hook nil "Functions to call after handling urgent options but before init files. The frame system uses this to open frames to display messages while XEmacs loads the user's initialization file.") (defvar after-init-hook nil "*Functions to call after loading the init file. The call is not protected by a condition-case, so you can set `debug-on-error' in the init file, and put all the actual code on `after-init-hook'.") (defvar term-setup-hook nil "*Functions to be called after loading terminal-specific Lisp code. See `run-hooks'. This variable exists for users to set, so as to override the definitions made by the terminal-specific file. XEmacs never sets this variable itself.") (defvar keyboard-type nil "The brand of keyboard you are using. This variable is used to define the proper function and keypad keys for use under X. It is used in a fashion analogous to the environment value TERM.") (defvar window-setup-hook nil "Normal hook run to initialize window system display. XEmacs runs this hook after processing the command line arguments and loading the user's init file.") (defconst initial-major-mode 'lisp-interaction-mode "Major mode command symbol to use for the initial *scratch* buffer.") (defvar emacs-roots nil "List of plausible roots of the XEmacs hierarchy.") (defvar user-init-directory-base ".xemacs" "Base of directory where user-installed init files may go.") (defvar user-init-directory (file-name-as-directory (paths-construct-path (list "~" user-init-directory-base))) "Directory where user-installed init files may go.") (defvar user-init-file-base "init.el" "Default name of the user init file if uncompiled. This should be used for migration purposes only.") (defvar user-init-file-base-list '("init.elc" "init.el") "List of allowed init files in the user's init directory. The first one found takes precedence.") (defvar user-home-init-file-base-list (append '(".emacs.elc" ".emacs.el" ".emacs") (and (eq system-type 'windows-nt) '("_emacs.elc" "_emacs.el" "_emacs"))) "List of allowed init files in the user's home directory. The first one found takes precedence.") (defvar load-home-init-file nil "Non-nil if XEmacs should load the init file from the home directory. Otherwise, XEmacs will offer migration to the init directory.") (defvar load-user-init-file-p t "Non-nil if XEmacs should load the user's init file.") ;; #### called `site-run-file' in FSFmacs (defvar site-start-file "site-start" "File containing site-wide run-time initializations. This file is loaded at run-time before `.emacs'. It contains inits that need to be in place for the entire site, but which, due to their higher incidence of change, don't make sense to load into XEmacs' dumped image. Thus, the run-time load order is: 1. file described in this variable, if non-nil; 2. `.emacs'; 3. `/path/to/xemacs/lisp/default.el'. Don't use the `site-start.el' file for things some users may not like. Put them in `default.el' instead, so that users can more easily override them. Users can prevent loading `default.el' with the `-q' option or by setting `inhibit-default-init' in their own init files, but inhibiting `site-start.el' requires `--no-site-file', which is less convenient.") ;;(defconst iso-8859-1-locale-regexp "8859[-_]?1" ;; "Regexp that specifies when to enable the ISO 8859-1 character set. ;;We do that if this regexp matches the locale name ;;specified by the LC_ALL, LC_CTYPE and LANG environment variables.") (defcustom mail-host-address nil "*Name of this machine, for purposes of naming users." :type 'string :group 'mail) (defcustom user-mail-address nil "*Full mailing address of this user. This is initialized based on `mail-host-address', after your init file is read, in case it sets `mail-host-address'." :type 'string :group 'mail) (defvar init-file-debug nil) (defvar init-file-had-error nil) (defvar init-file-loaded nil "True after the user's init file has been loaded (or suppressed with -q). This will be true when `after-init-hook' is run and at all times after, and will not be true at any time before.") (defvar initial-frame-unmapped-p nil) (defvar command-switch-alist '(("-help" . command-line-do-help) ("-version". command-line-do-version) ("-V" . command-line-do-version) ("-funcall". command-line-do-funcall) ("-f" . command-line-do-funcall) ("-e" . command-line-do-funcall-1) ("-eval" . command-line-do-eval) ("-load" . command-line-do-load) ("-l" . command-line-do-load) ("-insert" . command-line-do-insert) ("-i" . command-line-do-insert) ("-kill" . command-line-do-kill) ;; Options like +35 are handled specially. ;; Window-system, site, or package-specific code might add to this. ;; X11 handles its options by letting Xt remove args from this list. ) "Alist of command-line switches. Elements look like (SWITCH-STRING . HANDLER-FUNCTION). HANDLER-FUNCTION receives switch name as sole arg; remaining command-line args are in the variable `command-line-args-left'.") ;;; default switches ;;; Note: these doc strings are semi-magical. (defun command-line-do-help (arg) "Print the XEmacs usage message and exit." (let ((standard-output 'external-debugging-output)) (princ (concat "\n" (emacs-version) "\n\n")) (princ (if (featurep 'x) (concat "When creating a window on an X display, " (emacs-name) " accepts all standard X Toolkit command line options plus the following: -iconname