diff options
| author | Jim Blandy | 1991-07-13 09:35:06 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-07-13 09:35:06 +0000 |
| commit | 03e3c30a3b5479049437c0c8d3e2b0bba3fc7a6c (patch) | |
| tree | 5591e34a2a4052d79426fb954796b9e958974eec | |
| parent | a384cab3a76f5788bd0e5290755bd089c9ab5ff0 (diff) | |
| download | emacs-03e3c30a3b5479049437c0c8d3e2b0bba3fc7a6c.tar.gz emacs-03e3c30a3b5479049437c0c8d3e2b0bba3fc7a6c.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/startup.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index d8cfb1e3409..4be8088fb47 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -155,14 +155,19 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 155 | (terpri) | 155 | (terpri) |
| 156 | (kill-emacs))))) | 156 | (kill-emacs))))) |
| 157 | 157 | ||
| 158 | (let ((args (cdr command-line-args)) | 158 | (let ((done nil) |
| 159 | (done nil)) | 159 | (args (cdr command-line-args))) |
| 160 | |||
| 160 | ;; Figure out which user's init file to load, | 161 | ;; Figure out which user's init file to load, |
| 161 | ;; either from the environment or from the options. | 162 | ;; either from the environment or from the options. |
| 162 | (setq init-file-user (if noninteractive nil (user-login-name))) | 163 | (setq init-file-user (if noninteractive nil (user-login-name))) |
| 163 | ;; If user has not done su, use current $HOME to find .emacs. | 164 | ;; If user has not done su, use current $HOME to find .emacs. |
| 164 | (and init-file-user (string= init-file-user (user-real-login-name)) | 165 | (and init-file-user (string= init-file-user (user-real-login-name)) |
| 165 | (setq init-file-user "")) | 166 | (setq init-file-user "")) |
| 167 | |||
| 168 | ;; Process the command-line args, and delete the arguments | ||
| 169 | ;; processed. This is consistent with the way main in emacs.c | ||
| 170 | ;; does things. | ||
| 166 | (while (and (not done) args) | 171 | (while (and (not done) args) |
| 167 | (let ((argi (car args))) | 172 | (let ((argi (car args))) |
| 168 | (cond | 173 | (cond |
| @@ -178,7 +183,10 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 178 | ((string-equal argi "-debug-init") | 183 | ((string-equal argi "-debug-init") |
| 179 | (setq init-file-debug t | 184 | (setq init-file-debug t |
| 180 | args (cdr args))) | 185 | args (cdr args))) |
| 181 | (t (setq done t)))))) | 186 | (t (setq done t))))) |
| 187 | |||
| 188 | ;; Re-attach the program name to the front of the arg list. | ||
| 189 | (setcdr command-line-args args)) | ||
| 182 | 190 | ||
| 183 | ;; Load that user's init file, or the default one, or none. | 191 | ;; Load that user's init file, or the default one, or none. |
| 184 | (let ((debug-on-error init-file-debug) | 192 | (let ((debug-on-error init-file-debug) |
| @@ -225,7 +233,7 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 225 | (setq term (substring term 0 hyphend)) | 233 | (setq term (substring term 0 hyphend)) |
| 226 | (setq term nil))))) | 234 | (setq term nil))))) |
| 227 | 235 | ||
| 228 | ;; Handle all the other options. | 236 | ;; Process the remaining args. |
| 229 | (command-line-1 (cdr command-line-args)) | 237 | (command-line-1 (cdr command-line-args)) |
| 230 | 238 | ||
| 231 | ;; If -batch, terminate after processing the command options. | 239 | ;; If -batch, terminate after processing the command options. |
| @@ -296,14 +304,6 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 296 | (setq command-line-args-left (cdr command-line-args-left)) | 304 | (setq command-line-args-left (cdr command-line-args-left)) |
| 297 | (cond ((setq tem (assoc argi command-switch-alist)) | 305 | (cond ((setq tem (assoc argi command-switch-alist)) |
| 298 | (funcall (cdr tem) argi)) | 306 | (funcall (cdr tem) argi)) |
| 299 | ;; These args were already processed; ignore them. | ||
| 300 | ((or (string-equal argi "-q") | ||
| 301 | (string-equal argi "-no-init-file") | ||
| 302 | (string-equal argi "-debug-init") | ||
| 303 | (string-equal argi "-batch"))) | ||
| 304 | ((or (string-equal argi "-u") | ||
| 305 | (string-equal argi "-user")) | ||
| 306 | (setq command-line-args-left (cdr command-line-args-left))) | ||
| 307 | ((or (string-equal argi "-f") ;what the manual claims | 307 | ((or (string-equal argi "-f") ;what the manual claims |
| 308 | (string-equal argi "-funcall") | 308 | (string-equal argi "-funcall") |
| 309 | (string-equal argi "-e")) ; what the source used to say | 309 | (string-equal argi "-e")) ; what the source used to say |