(set (make-local-variable 'window-point-insertion-type) t)
;; Give *Messages* the same default-directory as *scratch*,
;; just to keep things predictable.
- (setq default-directory dir)))
+ (setq default-directory (or dir (expand-file-name "~/")))))
;; `user-full-name' is now known; reset its standard-value here.
(put 'user-full-name 'standard-value
(list (default-value 'user-full-name)))
charset-map-path))))
(if default-directory
(setq default-directory (abbreviate-file-name default-directory))
- (delay-warning 'initialization "Error setting default-directory"))
+ (display-warning 'initialization "Error setting default-directory"))
(let ((old-face-font-rescale-alist face-font-rescale-alist))
(unwind-protect
(command-line)
'("no" "off" "false" "0")))))
(setq no-blinking-cursor t))
+ ;; If curved quotes don't work, display ASCII approximations.
+ (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
+ (when (not (char-displayable-p (car char-repl)))
+ (or standard-display-table
+ (setq standard-display-table (make-display-table)))
+ (aset standard-display-table (car char-repl) (cdr char-repl))))
+
;; Re-evaluate predefined variables whose initial value depends on
;; the runtime context.
(mapc 'custom-reevaluate-setting
(funcall inner)
(setq init-file-had-error nil))
(error
- ;; Postpone displaying the warning until all hooks
- ;; in `after-init-hook' like `desktop-read' will finalize
- ;; possible changes in the window configuration.
- (add-hook
- 'after-init-hook
- (lambda ()
- (display-warning
- 'initialization
- (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\
+ (display-warning
+ 'initialization
+ (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace."
- user-init-file
- (get (car error) 'error-message)
- (if (cdr error) ": " "")
- (mapconcat (lambda (s) (prin1-to-string s t))
- (cdr error) ", "))
- :warning))
- t)
+ user-init-file
+ (get (car error) 'error-message)
+ (if (cdr error) ": " "")
+ (mapconcat (lambda (s) (prin1-to-string s t))
+ (cdr error) ", "))
+ :warning)
(setq init-file-had-error t))))
(if (and deactivate-mark transient-mark-mode)
(package-initialize))
(setq after-init-time (current-time))
- (run-hooks 'after-init-hook)
+ ;; Display any accumulated warnings after all functions in
+ ;; `after-init-hook' like `desktop-read' have finalized possible
+ ;; changes in the window configuration.
+ (run-hooks 'after-init-hook 'delayed-warnings-hook)
;; If *scratch* exists and init file didn't change its mode, initialize it.
(if (get-buffer "*scratch*")
;; to zero when `process-file-arg' returns.
(process-file-arg
(lambda (name)
- ;; If a relative filename was specified and
- ;; command-line-default-directory is nil,
- ;; silently drop that argument.
;; This can only happen if PWD is deleted.
- ;; The warning about setting default-directory will
- ;; clue you in.
- (when (and (or dir (file-name-absolute-p name))
+ (if (not (or dir (file-name-absolute-p name)))
+ (message "Ignoring relative file name (%s) due to \
+nil default-directory" name)
(let* ((file (expand-file-name
- (command-line-normalize-file-name name)
- dir))
+ (command-line-normalize-file-name name)
+ dir))
(buf (find-file-noselect file)))
(setq displayable-buffers (cons buf displayable-buffers))
(with-current-buffer buf
(setq line 0)
(unless (< column 1)
(move-to-column (1- column)))
- (setq column 0))))))))
+ (setq column 0)))))))
;; Add the long X options to longopts.
(dolist (tem command-line-x-option-alist)