Mercurial > emacs
changeset 8748:fca85f8be890
(command-line): If we can't load x-win.el, terminate.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Sep 1994 02:35:45 +0000 |
parents | d7115dce85f9 |
children | db4473742de7 |
files | lisp/startup.el |
diffstat | 1 files changed, 22 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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)))