Skip to content

Commit

Permalink
Fix showing errors in Preferences.el
Browse files Browse the repository at this point in the history
Reported by Bob Harper
  • Loading branch information
davidswelt committed Jul 24, 2018
1 parent 10b5782 commit 2b4dbe7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aquamacs/src/site-lisp/macosx/osx_defaults.el
Expand Up @@ -106,7 +106,9 @@ from earlier versions of the distribution."
(error ;; this code is from startup.el
(let ((message-log-max nil))
(with-current-buffer (get-buffer-create "*Messages*")
(insert "\n\n"
(setq buffer-read-only nil)
(insert (propertize ;; unclear why propertize does not work.
(concat "\n\n"
(format "An error has occurred while loading `%s.el (or .elc)':\n\n"
user-init-file)
(format "%s%s%s"
Expand All @@ -116,7 +118,8 @@ from earlier versions of the distribution."
"\n\n"
"To ensure normal operation, you should investigate and remove the\n"
"cause of the error in your initialization file. Start Emacs with\n"
"the `--debug-init' option to view a complete error backtrace.\n\n"))
"the `--debug-init' option to view a complete error backtrace.\n\n \n")
'face 'font-lock-warning-face)))
(message "Error in init file: %s%s%s"
(get (car error) 'error-message)
(if (cdr error) ": " "")
Expand Down

0 comments on commit 2b4dbe7

Please sign in to comment.