Commit 1ed14cfd authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(command-line): If we can't load x-win.el, terminate.

parent 41e77289
...@@ -246,13 +246,28 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.") ...@@ -246,13 +246,28 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
;;! (setq split-window-keep-point (> baud-rate 2400)) ;;! (setq split-window-keep-point (> baud-rate 2400))
;; Read window system's init file if using a window system. ;; Read window system's init file if using a window system.
(if (and window-system (not noninteractive)) (condition-case error
(load (concat term-file-prefix (if (and window-system (not noninteractive))
(symbol-name window-system) (load (concat term-file-prefix
"-win") (symbol-name window-system)
;; Every window system should have a startup file; "-win")
;; barf if we can't find it. ;; Every window system should have a startup file;
nil t)) ;; 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) (let ((done nil)
(args (cdr command-line-args))) (args (cdr command-line-args)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment