* lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n".
[bpt/emacs.git] / lisp / startup.el
index 06911e0..2f72e80 100644 (file)
@@ -1,6 +1,6 @@
 ;;; startup.el --- process Emacs shell arguments  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1992, 1994-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992, 1994-2012  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -65,6 +65,8 @@ once you are familiar with the contents of the startup screen."
 
 (defvar startup-screen-inhibit-startup-screen nil)
 
+;; FIXME? Why does this get such weirdly extreme treatment, when the
+;; more important inhibit-startup-screen does not.
 (defcustom inhibit-startup-echo-area-message nil
   "Non-nil inhibits the initial startup echo area message.
 Setting this variable takes effect
@@ -337,7 +339,9 @@ this variable usefully is to set it while building and dumping Emacs."
          (error "Customizing `site-run-file' does not work")))
 
 (defcustom mail-host-address nil
-  "Name of this machine, for purposes of naming users."
+  "Name of this machine, for purposes of naming users.
+If non-nil, Emacs uses this instead of `system-name' when constructing
+email addresses."
   :type '(choice (const nil) string)
   :group 'mail)
 
@@ -464,6 +468,10 @@ DIRS are relative."
       (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail))))))
 
 (defun normal-top-level ()
+  "Emacs calls this function when it first starts up.
+It sets `command-line-processed', processes the command-line,
+reads the initialization files, etc.
+It is the default value of the variable `top-level'."
   (if command-line-processed
       (message "Back to top level.")
     (setq command-line-processed t)
@@ -701,6 +709,8 @@ opening the first frame (e.g. open a connection to an X server).")
 (defvar server-process)
 
 (defun command-line ()
+  "A subroutine of `normal-top-level'.
+Amongst another things, it parses the command-line arguments."
   (setq before-init-time (current-time)
        after-init-time nil
         command-line-default-directory default-directory)
@@ -910,7 +920,7 @@ opening the first frame (e.g. open a connection to an X server).")
            (setq no-blinking-cursor t)))
       ;; If the cursorColor X resource exists, alter the `cursor' face
       ;; spec, but mark it as changed outside of Customize.
-      (let ((color (x-get-resource "cursorColor" "CursorColor")))
+      (let ((color (x-get-resource "cursorColor" "Foreground")))
        (when color
          (put 'cursor 'theme-face
               `((changed ((t :background ,color)))))
@@ -929,7 +939,7 @@ opening the first frame (e.g. open a connection to an X server).")
              emacs-basic-display
              (and (memq window-system '(x w32 ns))
                   (not (member (x-get-resource "cursorBlink" "CursorBlink")
-                               '("off" "false")))))
+                               '("no" "off" "false" "0")))))
     (setq no-blinking-cursor t))
 
   ;; Re-evaluate predefined variables whose initial value depends on
@@ -2076,6 +2086,7 @@ A fancy display is used on graphic displays, normal otherwise."
 (defalias 'display-splash-screen 'display-startup-screen)
 
 (defun command-line-1 (args-left)
+  "A subroutine of `command-line'."
   (display-startup-echo-area-message)
   (when (and pure-space-overflow
             (not noninteractive))
@@ -2330,6 +2341,7 @@ A fancy display is used on graphic displays, normal otherwise."
     (if (or inhibit-startup-screen
            initial-buffer-choice
            noninteractive
+            (daemonp)
            inhibit-x-resources)
 
        ;; Not displaying a startup screen.  If 3 or more files
@@ -2372,9 +2384,7 @@ A fancy display is used on graphic displays, normal otherwise."
       ;; (with-no-warnings
       ;;       (setq menubar-bindings-done t))
 
-      (if (> file-count 0)
-         (display-startup-screen t)
-       (display-startup-screen nil)))))
+      (display-startup-screen (> file-count 0)))))
 
 (defun command-line-normalize-file-name (file)
   "Collapse multiple slashes to one, to handle non-Emacs file names."