# HG changeset patch # User Richard M. Stallman # Date 779596545 0 # Node ID fca85f8be89074296577bdc43e36de5b0b1b6109 # Parent d7115dce85f9bcfad0c9ded1db86f067e31ce8ef (command-line): If we can't load x-win.el, terminate. diff -r d7115dce85f9 -r fca85f8be890 lisp/startup.el --- a/lisp/startup.el Thu Sep 15 02:15:29 1994 +0000 +++ b/lisp/startup.el Thu Sep 15 02:35:45 1994 +0000 @@ -246,13 +246,28 @@ ;;! (setq split-window-keep-point (> baud-rate 2400)) ;; Read window system's init file if using a window system. - (if (and window-system (not noninteractive)) - (load (concat term-file-prefix - (symbol-name window-system) - "-win") - ;; Every window system should have a startup file; - ;; barf if we can't find it. - nil t)) + (condition-case error + (if (and window-system (not noninteractive)) + (load (concat term-file-prefix + (symbol-name window-system) + "-win") + ;; Every window system should have a startup file; + ;; barf if we can't find it. + nil t)) + ;; If we can't read it, print the error message and exit. + (error + (if (eq (car error) 'error) + (message "%s" (apply 'concat (cdr error))) + (if (memq 'file-error (get (car error) 'error-conditions)) + (message "%s: %s" + (nth 1 error) + (mapconcat '(lambda (obj) (prin1-to-string obj t)) + (cdr (cdr error)) ", ")) + (message "%s: %s" + (get (car error) 'error-message) + (mapconcat '(lambda (obj) (prin1-to-string obj t)) + (cdr error) ", ")))) + (kill-emacs))) (let ((done nil) (args (cdr command-line-args)))