aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-15 02:35:45 +0000
committerRichard M. Stallman1994-09-15 02:35:45 +0000
commit1ed14cfd6db155ac2a49e129a9245928c1654d48 (patch)
treeeca1414e5c625c42592f1845695a28167e0410e3
parent41e7728940ada2a9370cd7b3cd23006b434e1d22 (diff)
downloademacs-1ed14cfd6db155ac2a49e129a9245928c1654d48.tar.gz
emacs-1ed14cfd6db155ac2a49e129a9245928c1654d48.zip
(command-line): If we can't load x-win.el, terminate.
-rw-r--r--lisp/startup.el29
1 files changed, 22 insertions, 7 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index a31aa73f7d4..5b5594e4a61 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -246,13 +246,28 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
246 ;;! (setq split-window-keep-point (> baud-rate 2400)) 246 ;;! (setq split-window-keep-point (> baud-rate 2400))
247 247
248 ;; Read window system's init file if using a window system. 248 ;; Read window system's init file if using a window system.
249 (if (and window-system (not noninteractive)) 249 (condition-case error
250 (load (concat term-file-prefix 250 (if (and window-system (not noninteractive))
251 (symbol-name window-system) 251 (load (concat term-file-prefix
252 "-win") 252 (symbol-name window-system)
253 ;; Every window system should have a startup file; 253 "-win")
254 ;; barf if we can't find it. 254 ;; Every window system should have a startup file;
255 nil t)) 255 ;; barf if we can't find it.
256 nil t))
257 ;; If we can't read it, print the error message and exit.
258 (error
259 (if (eq (car error) 'error)
260 (message "%s" (apply 'concat (cdr error)))
261 (if (memq 'file-error (get (car error) 'error-conditions))
262 (message "%s: %s"
263 (nth 1 error)
264 (mapconcat '(lambda (obj) (prin1-to-string obj t))
265 (cdr (cdr error)) ", "))
266 (message "%s: %s"
267 (get (car error) 'error-message)
268 (mapconcat '(lambda (obj) (prin1-to-string obj t))
269 (cdr error) ", "))))
270 (kill-emacs)))
256 271
257 (let ((done nil) 272 (let ((done nil)
258 (args (cdr command-line-args))) 273 (args (cdr command-line-args)))