]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
(calendar-astro-from-absolute): Autoload it.
[gnu-emacs] / lisp / startup.el
index c387b519d8e2ecea5ea1a8e7f625f73a4eaf46ac..a772af71e763c6245e52a9bf266b3792a752d1b7 100644 (file)
@@ -223,7 +223,9 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
   "*Name of this machine, for purposes of naming users.")
 
 (defvar user-mail-address nil
-  "*Full mailing address of this user.")
+  "*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'.")
 
 (defvar auto-save-list-file-prefix "~/.saves-"
   "Prefix for generating auto-save-list-file-name.
@@ -401,7 +403,9 @@ this prefix to create a unique file name.")
                        ("--debug-init") ("--iconic") ("--icon-type")))
            (argi (car args))
            (argval nil))
-       (if (string-match "=" argi)
+       ;; Handle --OPTION=VALUE format.
+       (if (and (string-match "\\`--" argi)
+                (string-match "=" argi))
            (setq argval (substring argi (match-end 0))
                  argi (substring argi 0 (match-beginning 0))))
        (let ((completion (try-completion argi longopts)))
@@ -611,9 +615,12 @@ this prefix to create a unique file name.")
             (setq menubar-bindings-done t)
             (unwind-protect
                 (progn
+                  ;; The convention for this piece of code is that
+                  ;; each piece of output starts with one or two newlines
+                  ;; and does not end with any newlines.
                   (insert (emacs-version)
                           "
-Copyright (C) 1995 Free Software Foundation, Inc.\n\n")
+Copyright (C) 1995 Free Software Foundation, Inc.")
                   ;; If keys have their default meanings,
                   ;; use precomputed string to save lots of time.
                   (if (and (eq (key-binding "\C-h") 'help-command)
@@ -621,13 +628,14 @@ Copyright (C) 1995 Free Software Foundation, Inc.\n\n")
                            (eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs)
                            (eq (key-binding "\C-ht") 'help-with-tutorial)
                            (eq (key-binding "\C-hi") 'info))
-                      (insert 
-       "Type C-h for help; C-x u to undo changes.  (`C-' means use CTRL key.)
+                      (insert "\n
+Type C-h for help; C-x u to undo changes.  (`C-' means use CTRL key.)
 To kill the Emacs job, type C-x C-c.
 Type C-h t for a tutorial on using Emacs.
 Type C-h i to enter Info, which you can use to read GNU documentation.")
                     (insert (substitute-command-keys
-                             (format "Type %s for help; \\[advertised-undo] to undo changes.  (`C-' means use CTRL key.)
+                             (format "\n
+Type %s for help; \\[advertised-undo] to undo changes.  (`C-' means use CTRL key.)
 To kill the Emacs job, type \\[save-buffers-kill-emacs].
 Type \\[help-with-tutorial] for a tutorial on using Emacs.
 Type \\[info] to enter Info, which you can use to read GNU documentation."
@@ -640,7 +648,7 @@ Type \\[info] to enter Info, which you can use to read GNU documentation."
                   ;; if that is not with the mouse.
                   (if (not (assq 'display (frame-parameters)))
                       (if (eq (key-binding "\M-`") 'tmm-menubar)
-                          (insert "\n\nType M-` to use the menu bar.")
+                          (insert "\n\nType F10, ESC ` or Meta-` to use the menu bar.")
                         (insert (substitute-command-keys
                                  "\n\nType \\[tmm-menubar] to use the menu bar."))))
 
@@ -648,28 +656,27 @@ Type \\[info] to enter Info, which you can use to read GNU documentation."
                   ;; window systems, but do have mouse support.
                   (if (or (memq system-type '(msdos windowsnt))
                           window-system)
-                      (insert "
+                      (insert "\n
 C-mouse-3 (third mouse button, with Control) gets a mode-specific menu."))
-                  (insert "\n")
+                  (if (directory-files "~/" nil "\\`\\.saves-" t)
+                      (insert "\n\nIf an Emacs session crashed recently,\n"
+                              "type M-x recover-session RET to recover"
+                              " the files you were editing."))
+
                   (if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
                            (eq (key-binding "\C-h\C-d") 'describe-distribution)
                            (eq (key-binding "\C-h\C-w") 'describe-no-warranty))
                       (insert 
-                       "
+                       "\n
 GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
 You may give out copies of Emacs; type C-h C-c to see the conditions.
 Type C-h C-d for information on getting the latest version.")
                     (insert (substitute-command-keys
-                             "
+                             "\n
 GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details.
 You may give out copies of Emacs; type \\[describe-copying] to see the conditions.
 Type \\[describe-distribution] for information on getting the latest version.")))
 
-                  (if (directory-files "~/" nil "\\`\\.saves-" t)
-                      (insert "\n\nIf an Emacs session crashed recently,\n"
-                              "type M-x recover-session RET to recover"
-                              " the files you were editing."))
-
                   (set-buffer-modified-p nil)
                   (sit-for 120))
               (save-excursion
@@ -788,6 +795,8 @@ Type \\[describe-distribution] for information on getting the latest version."))
                   (if (not did-hook)
                       ;; Ok, presume that the argument is a file name
                       (progn
+                        (if (string-match "\\`-" argi)
+                            (error "Unknown option `%s'" argi))
                         (setq file-count (1+ file-count))
                         (cond ((= file-count 1)
                                (setq first-file-buffer