diff options
| author | Richard M. Stallman | 1993-11-22 06:35:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-22 06:35:37 +0000 |
| commit | 52320897b41eac2de0ed4d3b00e95cb702aa1fb1 (patch) | |
| tree | 1ffa7c04eb6819d8cf59bb21e19a8111604c1e5d | |
| parent | 9de0760cc8208b8a5ce16411d20c2a17fad2fb87 (diff) | |
| download | emacs-52320897b41eac2de0ed4d3b00e95cb702aa1fb1.tar.gz emacs-52320897b41eac2de0ed4d3b00e95cb702aa1fb1.zip | |
(command-line): Set init-file-had-error to t or nil.
(command-line-1): Inhibit startup message if init-file-had-error.
| -rw-r--r-- | lisp/startup.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index cb701a3d6ce..7ba3a017b73 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -129,6 +129,8 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.") | |||
| 129 | 129 | ||
| 130 | (defvar init-file-debug nil) | 130 | (defvar init-file-debug nil) |
| 131 | 131 | ||
| 132 | (defvar init-file-had-error nil) | ||
| 133 | |||
| 132 | (defun normal-top-level () | 134 | (defun normal-top-level () |
| 133 | (if command-line-processed | 135 | (if command-line-processed |
| 134 | (message "Back to top level.") | 136 | (message "Back to top level.") |
| @@ -271,11 +273,14 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.") | |||
| 271 | ;; Do this without a condition-case if the user wants to debug. | 273 | ;; Do this without a condition-case if the user wants to debug. |
| 272 | (funcall inner) | 274 | (funcall inner) |
| 273 | (condition-case error | 275 | (condition-case error |
| 274 | (funcall inner) | 276 | (progn |
| 277 | (funcall inner) | ||
| 278 | (setq init-file-had-error nil)) | ||
| 275 | (error (message "Error in init file: %s%s%s" | 279 | (error (message "Error in init file: %s%s%s" |
| 276 | (get (car error) 'error-message) | 280 | (get (car error) 'error-message) |
| 277 | (if (cdr error) ": ") | 281 | (if (cdr error) ": ") |
| 278 | (mapconcat 'prin1-to-string (cdr error) ", ")))))) | 282 | (mapconcat 'prin1-to-string (cdr error) ", ")) |
| 283 | (setq init-file-had-error t))))) | ||
| 279 | 284 | ||
| 280 | (run-hooks 'after-init-hook) | 285 | (run-hooks 'after-init-hook) |
| 281 | 286 | ||
| @@ -304,7 +309,7 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.") | |||
| 304 | (if noninteractive (kill-emacs t))) | 309 | (if noninteractive (kill-emacs t))) |
| 305 | 310 | ||
| 306 | (defun command-line-1 (command-line-args-left) | 311 | (defun command-line-1 (command-line-args-left) |
| 307 | (or noninteractive (input-pending-p) | 312 | (or noninteractive (input-pending-p) init-file-had-error |
| 308 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) | 313 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) |
| 309 | "For information about the GNU Project and its goals, type C-h C-p." | 314 | "For information about the GNU Project and its goals, type C-h C-p." |
| 310 | (substitute-command-keys | 315 | (substitute-command-keys |