]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
(gnus-newsrc-file-version): Add defvar.
[gnu-emacs] / lisp / startup.el
index f1623cf374bd338c2bbb0156281da281296d304c..32021225e7e5aac139f6f25260a381867f97130e 100644 (file)
@@ -1,7 +1,7 @@
 ;;; startup.el --- process Emacs shell arguments
 
 ;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-;;   2001, 2002, 2004, 2005  Free Software Foundation, Inc.
+;;   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -575,7 +575,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
 
   ;; Choose a reasonable location for temporary files.
   (custom-reevaluate-setting 'temporary-file-directory)
-  (custom-reevaluate-setting 'small-emporary-file-directory)
+  (custom-reevaluate-setting 'small-temporary-file-directory)
   (custom-reevaluate-setting 'auto-save-file-name-transforms)
 
   ;; See if we should import version-control from the environment variable.
@@ -984,7 +984,13 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
         (setq term
               (if (setq hyphend (string-match "[-_][^-_]+$" term))
                   (substring term 0 hyphend)
-                nil)))))
+                nil)))
+      (when term
+       ;; The terminal file has been loaded, now call the terminal
+       ;; specific initialization function.
+       (let ((term-init-func (intern (concat "terminal-init-" term))))
+         (when (fboundp term-init-func)
+           (funcall term-init-func))))))
 
   ;; Update the out-of-memory error message based on user's key bindings
   ;; for save-some-buffers.
@@ -1343,7 +1349,7 @@ You can do basic editing with the menu bar and scroll bar using the mouse.
 
 Useful File menu items:
 Exit Emacs             (or type Control-x followed by Control-c)
-Recover Session                Recover files you were editing before a crash
+Recover Crashed Session        Recover files you were editing before a crash
 
 Important Help menu items:
 Emacs Tutorial         Learn how to use Emacs efficiently
@@ -1629,6 +1635,15 @@ normal otherwise."
                      (setq file file-ex))
                    (load file nil t)))
 
+               ;; This is used to handle -script.  It's not clear
+               ;; we need to document it.
+                ((member argi '("-scriptload"))
+                 (let* ((file (command-line-normalize-file-name
+                               (or argval (pop command-line-args-left))))
+                        ;; Take file from default dir.
+                        (file-ex (expand-file-name file)))
+                   (load file-ex nil t t)))
+
                 ((equal argi "-insert")
                  (setq tem (or argval (pop command-line-args-left)))
                  (or (stringp tem)
@@ -1709,11 +1724,7 @@ normal otherwise."
   ;; Maybe display a startup screen.
   (unless (or inhibit-startup-message
              noninteractive
-             emacs-quick-startup
-            ;; Don't display startup screen if init file
-            ;; has started some sort of server.
-            (and (fboundp 'process-list)
-                 (process-list)))
+             emacs-quick-startup)
     ;; Display a startup screen, after some preparations.
 
     ;; If there are no switches to process, we might as well