[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog startup.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog startup.el |
Date: |
Wed, 16 Sep 2009 17:54:17 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/09/16 17:54:16
Modified files:
lisp : ChangeLog startup.el
Log message:
(command-line): Initialize the window-system after
processing the command-line.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16182&r2=1.16183
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/startup.el?cvsroot=emacs&r1=1.545&r2=1.546
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16182
retrieving revision 1.16183
diff -u -b -r1.16182 -r1.16183
--- ChangeLog 16 Sep 2009 13:15:10 -0000 1.16182
+++ ChangeLog 16 Sep 2009 17:54:13 -0000 1.16183
@@ -1,5 +1,8 @@
2009-09-16 Stefan Monnier <address@hidden>
+ * startup.el (command-line): Initialize the window-system after
+ processing the command-line.
+
* textmodes/page.el (what-page): Make sure we don't inf-loop if
page-delimiter matches the empty string.
Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.545
retrieving revision 1.546
diff -u -b -r1.545 -r1.546
--- startup.el 15 Sep 2009 07:09:17 -0000 1.545
+++ startup.el 16 Sep 2009 17:54:16 -0000 1.546
@@ -727,44 +727,6 @@
(setq eol-mnemonic-dos "(DOS)"
eol-mnemonic-mac "(Mac)")))
- ;; Make sure window system's init file was loaded in loadup.el if
- ;; using a window system.
- (condition-case error
- (unless noninteractive
- (if (and initial-window-system
- (not (featurep
- (intern
- (concat (symbol-name initial-window-system) "-win")))))
- (error "Unsupported window system `%s'" initial-window-system))
- ;; Process window-system specific command line parameters.
- (setq command-line-args
- (funcall
- (or (cdr (assq initial-window-system handle-args-function-alist))
- (error "Unsupported window system `%s'" initial-window-system))
- command-line-args))
- ;; Initialize the window system. (Open connection, etc.)
- (funcall
- (or (cdr (assq initial-window-system
window-system-initialization-alist))
- (error "Unsupported window system `%s'" initial-window-system))))
- ;; If there was an error, print the error message and exit.
- (error
- (princ
- (if (eq (car error) 'error)
- (apply 'concat (cdr error))
- (if (memq 'file-error (get (car error) 'error-conditions))
- (format "%s: %s"
- (nth 1 error)
- (mapconcat (lambda (obj) (prin1-to-string obj t))
- (cdr (cdr error)) ", "))
- (format "%s: %s"
- (get (car error) 'error-message)
- (mapconcat (lambda (obj) (prin1-to-string obj t))
- (cdr error) ", "))))
- 'external-debugging-output)
- (terpri 'external-debugging-output)
- (setq initial-window-system nil)
- (kill-emacs)))
-
(set-locale-environment nil)
;; Convert preloaded file names in load-history to absolute.
@@ -869,6 +831,46 @@
(and command-line-args
(setcdr command-line-args args)))
+ ;; Make sure window system's init file was loaded in loadup.el if
+ ;; using a window system.
+ ;; Initialize the window-system only after processing the command-line
+ ;; args so that -Q can influence this initialization.
+ (condition-case error
+ (unless noninteractive
+ (if (and initial-window-system
+ (not (featurep
+ (intern
+ (concat (symbol-name initial-window-system) "-win")))))
+ (error "Unsupported window system `%s'" initial-window-system))
+ ;; Process window-system specific command line parameters.
+ (setq command-line-args
+ (funcall
+ (or (cdr (assq initial-window-system handle-args-function-alist))
+ (error "Unsupported window system `%s'" initial-window-system))
+ command-line-args))
+ ;; Initialize the window system. (Open connection, etc.)
+ (funcall
+ (or (cdr (assq initial-window-system
window-system-initialization-alist))
+ (error "Unsupported window system `%s'" initial-window-system))))
+ ;; If there was an error, print the error message and exit.
+ (error
+ (princ
+ (if (eq (car error) 'error)
+ (apply 'concat (cdr error))
+ (if (memq 'file-error (get (car error) 'error-conditions))
+ (format "%s: %s"
+ (nth 1 error)
+ (mapconcat (lambda (obj) (prin1-to-string obj t))
+ (cdr (cdr error)) ", "))
+ (format "%s: %s"
+ (get (car error) 'error-message)
+ (mapconcat (lambda (obj) (prin1-to-string obj t))
+ (cdr error) ", "))))
+ 'external-debugging-output)
+ (terpri 'external-debugging-output)
+ (setq initial-window-system nil)
+ (kill-emacs)))
+
(run-hooks 'before-init-hook)
;; Under X Window, this creates the X frame and deletes the terminal frame.