aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-11-22 06:35:37 +0000
committerRichard M. Stallman <[email protected]>1993-11-22 06:35:37 +0000
commit52320897b41eac2de0ed4d3b00e95cb702aa1fb1 (patch)
tree1ffa7c04eb6819d8cf59bb21e19a8111604c1e5d
parent9de0760cc8208b8a5ce16411d20c2a17fad2fb87 (diff)
(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.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index cb701a3d6c..7ba3a017b7 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -129,6 +129,8 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
(defvar init-file-debug nil)
+(defvar init-file-had-error nil)
+
(defun normal-top-level ()
(if command-line-processed
(message "Back to top level.")
@@ -271,11 +273,14 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
;; Do this without a condition-case if the user wants to debug.
(funcall inner)
(condition-case error
- (funcall inner)
+ (progn
+ (funcall inner)
+ (setq init-file-had-error nil))
(error (message "Error in init file: %s%s%s"
(get (car error) 'error-message)
(if (cdr error) ": ")
- (mapconcat 'prin1-to-string (cdr error) ", "))))))
+ (mapconcat 'prin1-to-string (cdr error) ", "))
+ (setq init-file-had-error t)))))
(run-hooks 'after-init-hook)
@@ -304,7 +309,7 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
(if noninteractive (kill-emacs t)))
(defun command-line-1 (command-line-args-left)
- (or noninteractive (input-pending-p)
+ (or noninteractive (input-pending-p) init-file-had-error
(message (if (eq (key-binding "\C-h\C-p") 'describe-project)
"For information about the GNU Project and its goals, type C-h C-p."
(substitute-command-keys