commit b8478b2ab7ad19c629da9c6b0dfd9a6544a6acee (HEAD, refs/remotes/origin/master) Author: Daniel Colascione Date: Tue Jun 12 23:28:47 2018 -0700 Clarify that enabling a theme does not disable other themes Avoid user confusion by explicitly stating that enabling a theme does not imply disabling other themes and that theme load functions are not theme switch functions. * lisp/custom.el (load-theme, enable-theme): Clarify docstrings. diff --git a/lisp/custom.el b/lisp/custom.el index b7539685a8..2a489c4f5b 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1184,7 +1184,7 @@ This variable cannot be set in a Custom theme." :version "24.1") (defun load-theme (theme &optional no-confirm no-enable) - "Load Custom theme named THEME from its file. + "Load Custom theme named THEME from its file and possibly enable it. The theme file is named THEME-theme.el, in one of the directories specified by `custom-theme-load-path'. @@ -1197,6 +1197,11 @@ Normally, this function also enables THEME. If optional arg NO-ENABLE is non-nil, load the theme but don't enable it, unless the theme was already enabled. +Note that enabling THEME does not disable any other +already-enabled themes. If THEME is enabled, it has the highest +precedence (after `user') among enabled themes. To disable other +themes, use `disable-theme'. + This function is normally called through Customize when setting `custom-enabled-themes'. If used directly in your init file, it should be called with a non-nil NO-CONFIRM argument, or after @@ -1324,8 +1329,12 @@ variable `custom-known-themes'." (defun enable-theme (theme) "Reenable all variable and face settings defined by THEME. THEME should be either `user', or a theme loaded via `load-theme'. + After this function completes, THEME will have the highest -precedence (after `user')." +precedence (after `user') among enabled themes. + +Note that any already-enabled themes remain enabled after this +function runs. To disable other themes, use `disable-theme'." (interactive (list (intern (completing-read "Enable custom theme: " commit 5ed119141d10a09c4cd767c42a25a285f4f844ce Author: Daniel Colascione Date: Tue Jun 12 23:09:23 2018 -0700 Ignore focus events for dead frames Frames can die between the time we generate a focus event and the time we get around to processing it. Do run after-focus-change-function, since that's idempotent and we want to make sure not to miss any changes. * lisp/frame.el (handle-focus-in, handle-focus-out): Check for dead frames. diff --git a/lisp/frame.el b/lisp/frame.el index 7dbd346bd9..70b4b242a0 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -209,11 +209,12 @@ the window system." (interactive "e") (unless (eq (car-safe event) 'focus-in) (error "handle-focus-in should handle focus-in events")) - (internal-handle-focus-in event) (let ((frame (nth 1 event))) - (setf (frame-parameter frame 'last-focus-update) t) - (run-hooks 'focus-in-hook) - (funcall after-focus-change-function))) + (when (frame-live-p frame) + (internal-handle-focus-in event) + (setf (frame-parameter frame 'last-focus-update) t) + (run-hooks 'focus-in-hook))) + (funcall after-focus-change-function)) (defun handle-focus-out (event) "Handle a focus-out event. @@ -225,9 +226,10 @@ that's not the whole story: see `after-focus-change-function'." (unless (eq (car event) 'focus-out) (error "handle-focus-out should handle focus-out events")) (let ((frame (nth 1 event))) - (setf (frame-parameter frame 'last-focus-update) nil) - (run-hooks 'focus-out-hook) - (funcall after-focus-change-function))) + (when (frame-live-p frame) + (setf (frame-parameter frame 'last-focus-update) nil) + (run-hooks 'focus-out-hook))) + (funcall after-focus-change-function)) (defun handle-move-frame (event) "Handle a move-frame event. commit 97b78542f60d1079a8407da5e1974d064951fb3d Author: Stefan Monnier Date: Tue Jun 12 17:06:32 2018 -0400 * lisp/textmodes/ispell.el (ispell-menu-map): Init in declaration (ispell-menu-map-needed): Remove, now that the menu doesn't include the list of dictionaries any more, so it's basically constant. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index cda76407f8..d1d47718f9 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -817,16 +817,6 @@ See `ispell-buffer-with-debug' for an example of use." ;; because otherwise this file gets autoloaded every time Emacs starts ;; so that it can set up the menus and determine keyboard equivalents. -;;;###autoload -(defvar ispell-menu-map nil "Key map for ispell menu.") -;; Redo menu when loading ispell to get dictionary modifications -(setq ispell-menu-map nil) - -;;; Set up dictionary -;;;###autoload -(defvar ispell-menu-map-needed - (unless ispell-menu-map 'reload)) - (defvar ispell-library-directory (condition-case () (ispell-check-version) (error nil)) @@ -1417,80 +1407,78 @@ The variable `ispell-library-directory' defines their location." (push name dict-list))) dict-list)) -;; Define commands in menu in opposite order you want them to appear. -;;;###autoload -(if ispell-menu-map-needed - (progn - (setq ispell-menu-map (make-sparse-keymap "Spell")) - (define-key ispell-menu-map [ispell-change-dictionary] - `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary - :help ,(purecopy "Supply explicit dictionary file name"))) - (define-key ispell-menu-map [ispell-kill-ispell] - `(menu-item ,(purecopy "Kill Process") - (lambda () (interactive) (ispell-kill-ispell nil 'clear)) - :enable (and (boundp 'ispell-process) ispell-process - (eq (ispell-process-status) 'run)) - :help ,(purecopy "Terminate Ispell subprocess"))) - (define-key ispell-menu-map [ispell-pdict-save] - `(menu-item ,(purecopy "Save Dictionary") - (lambda () (interactive) (ispell-pdict-save t t)) - :help ,(purecopy "Save personal dictionary"))) - (define-key ispell-menu-map [ispell-customize] - `(menu-item ,(purecopy "Customize...") - (lambda () (interactive) (customize-group 'ispell)) - :help ,(purecopy "Customize spell checking options"))) - (define-key ispell-menu-map [ispell-help] - ;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ? - `(menu-item ,(purecopy "Help") - (lambda () (interactive) (describe-function 'ispell-help)) - :help ,(purecopy "Show standard Ispell keybindings and commands"))) - (define-key ispell-menu-map [flyspell-mode] - `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") - flyspell-mode - :help ,(purecopy "Check spelling while you edit the text") - :button (:toggle . (bound-and-true-p flyspell-mode)))) - (define-key ispell-menu-map [ispell-complete-word] - `(menu-item ,(purecopy "Complete Word") ispell-complete-word - :help ,(purecopy "Complete word at cursor using dictionary"))) - (define-key ispell-menu-map [ispell-complete-word-interior-frag] - `(menu-item ,(purecopy "Complete Word Fragment") - ispell-complete-word-interior-frag - :help ,(purecopy "Complete word fragment at cursor"))))) - ;;;###autoload -(if ispell-menu-map-needed - (progn - (define-key ispell-menu-map [ispell-continue] - `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue - :enable (and (boundp 'ispell-region-end) - (marker-position ispell-region-end) - (equal (marker-buffer ispell-region-end) - (current-buffer))) - :help ,(purecopy "Continue spell checking last region"))) - (define-key ispell-menu-map [ispell-word] - `(menu-item ,(purecopy "Spell-Check Word") ispell-word - :help ,(purecopy "Spell-check word at cursor"))) - (define-key ispell-menu-map [ispell-comments-and-strings] - `(menu-item ,(purecopy "Spell-Check Comments") - ispell-comments-and-strings - :help ,(purecopy "Spell-check only comments and strings"))))) - +(defconst ispell-menu-map + ;; Use `defconst' so as to redo the menu when loading ispell, like the + ;; previous code did. + + ;; Define commands in menu in opposite order you want them to appear. + (let ((map (make-sparse-keymap "Spell"))) + (define-key map [ispell-change-dictionary] + `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary + :help ,(purecopy "Supply explicit dictionary file name"))) + (define-key map [ispell-kill-ispell] + `(menu-item ,(purecopy "Kill Process") + (lambda () (interactive) (ispell-kill-ispell nil 'clear)) + :enable (and (boundp 'ispell-process) ispell-process + (eq (ispell-process-status) 'run)) + :help ,(purecopy "Terminate Ispell subprocess"))) + (define-key map [ispell-pdict-save] + `(menu-item ,(purecopy "Save Dictionary") + (lambda () (interactive) (ispell-pdict-save t t)) + :help ,(purecopy "Save personal dictionary"))) + (define-key map [ispell-customize] + `(menu-item ,(purecopy "Customize...") + (lambda () (interactive) (customize-group 'ispell)) + :help ,(purecopy "Customize spell checking options"))) + (define-key map [ispell-help] + ;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ? + `(menu-item ,(purecopy "Help") + (lambda () (interactive) (describe-function 'ispell-help)) + :help ,(purecopy "Show standard Ispell keybindings and commands"))) + (define-key map [flyspell-mode] + `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") + flyspell-mode + :help ,(purecopy "Check spelling while you edit the text") + :button (:toggle . (bound-and-true-p flyspell-mode)))) + (define-key map [ispell-complete-word] + `(menu-item ,(purecopy "Complete Word") ispell-complete-word + :help ,(purecopy "Complete word at cursor using dictionary"))) + (define-key map [ispell-complete-word-interior-frag] + `(menu-item ,(purecopy "Complete Word Fragment") + ispell-complete-word-interior-frag + :help ,(purecopy "Complete word fragment at cursor"))) + + (define-key map [ispell-continue] + `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue + :enable (and (boundp 'ispell-region-end) + (marker-position ispell-region-end) + (equal (marker-buffer ispell-region-end) + (current-buffer))) + :help ,(purecopy "Continue spell checking last region"))) + (define-key map [ispell-word] + `(menu-item ,(purecopy "Spell-Check Word") ispell-word + :help ,(purecopy "Spell-check word at cursor"))) + (define-key map [ispell-comments-and-strings] + `(menu-item ,(purecopy "Spell-Check Comments") + ispell-comments-and-strings + :help ,(purecopy "Spell-check only comments and strings"))) + + (define-key map [ispell-region] + `(menu-item ,(purecopy "Spell-Check Region") ispell-region + :enable mark-active + :help ,(purecopy "Spell-check text in marked region"))) + (define-key map [ispell-message] + `(menu-item ,(purecopy "Spell-Check Message") ispell-message + :visible (eq major-mode 'mail-mode) + :help ,(purecopy "Skip headers and included message text"))) + (define-key map [ispell-buffer] + `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer + :help ,(purecopy "Check spelling of selected buffer"))) + map) + "Key map for ispell menu.") ;;;###autoload -(if ispell-menu-map-needed - (progn - (define-key ispell-menu-map [ispell-region] - `(menu-item ,(purecopy "Spell-Check Region") ispell-region - :enable mark-active - :help ,(purecopy "Spell-check text in marked region"))) - (define-key ispell-menu-map [ispell-message] - `(menu-item ,(purecopy "Spell-Check Message") ispell-message - :visible (eq major-mode 'mail-mode) - :help ,(purecopy "Skip headers and included message text"))) - (define-key ispell-menu-map [ispell-buffer] - `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer - :help ,(purecopy "Check spelling of selected buffer"))) - (fset 'ispell-menu-map (symbol-value 'ispell-menu-map)))) - +(fset 'ispell-menu-map (symbol-value 'ispell-menu-map)) ;;; ********************************************************************** commit d93ba8ddeb30bca74b306b6e768f6d20416e1802 Author: Eli Zaretskii Date: Tue Jun 12 19:26:44 2018 +0300 ; Assorted documentation fixes in recent changes * etc/NEWS: Minor copyedits of recent entries. * src/keyboard.c (Finternal_handle_focus_in): * lisp/frame.el (frame-focus-state): Doc fixes. * doc/lispref/hooks.texi (Standard Hooks): Mention after-delete-frame-functions. diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index e374d02def..0d50a293f2 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -124,6 +124,7 @@ The command loop runs this soon after @code{post-command-hook} (q.v.). @xref{Input Focus}. @item delete-frame-functions +@itemx after-delete-frame-functions @xref{Deleting Frames}. @item delete-terminal-functions diff --git a/etc/NEWS b/etc/NEWS index 52cedc4d40..50433eb7f2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -590,26 +590,26 @@ manual for more details. * Lisp Changes in Emacs 27.1 +++ -** New hook `after-delete-frame-functions'. Works like - `delete-frame-functions', but runs after the frame to be deleted - has been made dead and removed from the frame list, simplifying - some kinds of code. +** New hook 'after-delete-frame-functions'. +This works like 'delete-frame-functions', but runs after the frame to +be deleted has been made dead and removed from the frame list. +++ -** New focus state inspection interface: `focus-in-hook' and - `focus-out-hook' are marked obsolete. Instead, attach to - `after-focus-change-function' using `add-function' and inspect the - focus state of each frame using `frame-focus-state'. +** New frame focus state inspection interface. +The hooks 'focus-in-hook' and 'focus-out-hook' are now obsolete. +Instead, attach to 'after-focus-change-function' using 'add-function' +and inspect the focus state of each frame using 'frame-focus-state'. +++ -** Emacs now requests and recognizes focus-change notifications from - terminals that support the feature, meaning that `focus-in-hook' - and `focus-out-hook' may run for TTY frames. +** Emacs now requests and recognizes focus-change notifications from TTYs. +On terminal emulators that support the feature, Emacs can now support +'focus-in-hook' and 'focus-out-hook' for TTY frames. +++ -** Face specifications (of the kind used in `face-remapping-alist') - now support filters, allowing faces to vary between windows display - the same buffer. +** Window-specific face remapping. +Face specifications (of the kind used in 'face-remapping-alist') +now support filters, allowing faces to vary between different windows +displaying the same buffer. +++ ** New function assoc-delete-all. @@ -634,7 +634,7 @@ backslash. For example: ** Omitting variables after '&optional' and '&rest' is now allowed. For example (defun foo (&optional)) is no longer an error. This is sometimes convenient when writing macros. See the ChangeLog entry -titled "Allow `&rest' or `&optional' without following variable +titled "Allow '&rest' or '&optional' without following variable (Bug#29165)" for a full listing of which arglists are accepted across versions. diff --git a/lisp/frame.el b/lisp/frame.el index 38f785901e..7dbd346bd9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -131,9 +131,10 @@ appended when the minibuffer frame is created." (defun frame-focus-state (&optional frame) "Return FRAME's last known focus state. +If nil or omitted, FRAME defaults to the selected frame. + Return nil if the frame is definitely known not be focused, t if -the frame is known to be focused, and 'unknown if we don't know. If -FRAME is nil, query the selected frame." +the frame is known to be focused, and `unknown' if we don't know." (let* ((frame (or frame (selected-frame))) (tty-top-frame (tty-top-frame frame))) (if (not tty-top-frame) diff --git a/src/keyboard.c b/src/keyboard.c index 0d6a6ad56b..12fc33787a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6605,8 +6605,8 @@ has the same base event type and all the specified modifiers. */) DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in, Sinternal_handle_focus_in, 1, 1, 0, - doc: /* Internally handle focus-in events, possibly generating -an artifical switch-frame event. */) + doc: /* Internally handle focus-in events. +This function potentially generates an artifical switch-frame event. */) (Lisp_Object event) { Lisp_Object frame; @@ -6616,9 +6616,9 @@ an artifical switch-frame event. */) error ("invalid focus-in event"); /* Conceptually, the concept of window manager focus on a particular - frame and the Emacs selected frame shouldn't be related, but for a - long time, we automatically switched the selected frame in response - to focus events, so let's keep doing that. */ + frame and the Emacs selected frame shouldn't be related, but for + a long time, we automatically switched the selected frame in + response to focus events, so let's keep doing that. */ bool switching = (!EQ (frame, internal_last_event_frame) && !EQ (frame, selected_frame)); internal_last_event_frame = frame; commit e9c189ccae342c63de2629c5a51d1f40d1a562b6 Author: Eli Zaretskii Date: Tue Jun 12 18:03:56 2018 +0300 Fix initialization of custom-delayed-init-variables * lisp/startup.el (command-line): Re-evaluate delayed-init custom variables one more time after setting up the initial window-system. (Bug#30994) * doc/emacs/custom.texi (Early Init File): * etc/NEWS: Warn against using early-init.el as a substitute for .emacs. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index dbcc4c1fd1..51e36ea4b7 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2606,7 +2606,7 @@ Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. @subsection The Early Init File @cindex early init file - Most customizations for Emacs can be put in the normal init file, + Most customizations for Emacs should be put in the normal init file, @file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes desirable to have customizations that take effect during Emacs startup earlier than the normal init file is processed. Such customizations can be put in the early @@ -2619,5 +2619,15 @@ which only affect the installation of new packages, and not the process of making already-installed packages available, may be customized in the regular init file. @xref{Package Installation}. + We do not recommend that you move into @file{early-init.el} +customizations that can be left in the normal init files. That is +because the early init file is read before the GUI is initialized, so +customizations related to GUI features will not work reliably in +@file{early-init.el}. By contrast, the normal init files are read +after the GUI is initialized. If you must have customizations in the +early init file that rely on GUI features, make them run off hooks +provided by the Emacs startup, such as @code{window-setup-hook} or +@code{tty-setup-hook}. @xref{Hooks}. + For more information on the early init file, @pxref{Init File,,, elisp, The Emacs Lisp Reference Manual}. diff --git a/etc/NEWS b/etc/NEWS index 402dcb13c7..52cedc4d40 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -58,6 +58,13 @@ is initialized. The primary purpose is to allow customizing how the package system is initialized given that initialization now happens before loading the regular init file (see below). +We recommend against putting any customizations in this file that +don't need to be set up before initializing installed add-on packages, +because the early init file is read too early into the startup +process, and some important parts of the Emacs session, such as +window-system and other GUI features, are not yet set up, which could +make some customization fail to work. + +++ ** Installed packages are now activated *before* loading the init file. This is part of a change intended to eliminate the behavior of diff --git a/lisp/startup.el b/lisp/startup.el index 245b9ac5ba..fdf6cc1dba 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1126,11 +1126,11 @@ please check its value") ;; Re-evaluate predefined variables whose initial value depends on ;; the runtime context. (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH - (mapc 'custom-reevaluate-setting + (setq custom-delayed-init-variables ;; Initialize them in the same order they were loaded, in case there ;; are dependencies between them. - (prog1 (nreverse custom-delayed-init-variables) - (setq custom-delayed-init-variables nil)))) + (nreverse custom-delayed-init-variables)) + (mapc 'custom-reevaluate-setting custom-delayed-init-variables)) ;; Warn for invalid user name. (when init-file-user @@ -1262,6 +1262,13 @@ please check its value") (startup--setup-quote-display) (setq internal--text-quoting-flag t)) + ;; Re-evaluate again the predefined variables whose initial value + ;; depends on the runtime context, in case some of them depend on + ;; the window-system features. Example: blink-cursor-mode. + (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH + (mapc 'custom-reevaluate-setting custom-delayed-init-variables) + (setq custom-delayed-init-variables nil)) + (normal-erase-is-backspace-setup-frame) ;; Register default TTY colors for the case the terminal hasn't a commit c912db0836f6975519dea57fb0a4adc2988da1b1 Author: Noam Postavsky Date: Fri May 25 08:40:55 2018 -0400 Give warning if losing value to defvaralias (Bug#5950) * src/eval.c (Fdefvaralias): Call `display-warning' if the alias target has a non-eq value to the variable being aliased. * test/src/eval-tests.el (defvaralias-overwrite-warning): New test. diff --git a/src/eval.c b/src/eval.c index 86011a234c..5c7cb3196a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -623,6 +623,16 @@ The return value is BASE-VARIABLE. */) if (NILP (Fboundp (base_variable))) set_internal (base_variable, find_symbol_value (new_alias), Qnil, SET_INTERNAL_BIND); + else if (!NILP (Fboundp (new_alias)) + && !EQ (find_symbol_value (new_alias), + find_symbol_value (base_variable))) + call2 (intern ("display-warning"), + list3 (intern ("defvaralias"), intern ("losing-value"), new_alias), + CALLN (Fformat_message, + build_string + ("Overwriting value of `%s' by aliasing to `%s'"), + new_alias, base_variable)); + { union specbinding *p; diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 319dd91c86..281d959b53 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el @@ -26,6 +26,7 @@ ;;; Code: (require 'ert) +(eval-when-compile (require 'cl-lib)) (ert-deftest eval-tests--bug24673 () "Check that Bug#24673 has been fixed." @@ -117,4 +118,25 @@ crash/abort/malloc assert failure on the next test." "Check that Bug#31072 is fixed." (should-error (eval '(defvar 1) t) :type 'wrong-type-argument)) +(ert-deftest defvaralias-overwrite-warning () + "Test for Bug#5950." + (defvar eval-tests--foo) + (setq eval-tests--foo 2) + (defvar eval-tests--foo-alias) + (setq eval-tests--foo-alias 1) + (cl-letf (((symbol-function 'display-warning) + (lambda (type &rest _) + (throw 'got-warning type)))) + ;; Warn if we lose a value through aliasing. + (should (equal + '(defvaralias losing-value eval-tests--foo-alias) + (catch 'got-warning + (defvaralias 'eval-tests--foo-alias 'eval-tests--foo)))) + ;; Don't warn if we don't. + (makunbound 'eval-tests--foo-alias) + (should (eq 'no-warning + (catch 'got-warning + (defvaralias 'eval-tests--foo-alias 'eval-tests--foo) + 'no-warning))))) + ;;; eval-tests.el ends here commit 2634d867b66ddff568048ce664f003ae8950bdfa Author: Noam Postavsky Date: Fri May 25 21:37:17 2018 -0400 Let display-warning work during bootstrap * lisp/emacs-lisp/warnings.el (display-warning): Only call `special-mode' and `newline' if they are `fbound'. diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 665733181c..c4d97ceab0 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -241,11 +241,15 @@ See also `warning-series', `warning-prefix-function' and (old (get-buffer buffer-name)) (buffer (or old (get-buffer-create buffer-name))) (level-info (assq level warning-levels)) + ;; `newline' may be unbound during bootstrap. + (newline (if (fboundp 'newline) #'newline + (lambda () (insert "\n")))) start end) (with-current-buffer buffer ;; If we created the buffer, disable undo. (unless old - (special-mode) + (when (fboundp 'special-mode) ; Undefined during bootstrap. + (special-mode)) (setq buffer-read-only t) (setq buffer-undo-list t)) (goto-char (point-max)) @@ -256,7 +260,7 @@ See also `warning-series', `warning-prefix-function' and (funcall warning-series))))) (let ((inhibit-read-only t)) (unless (bolp) - (newline)) + (funcall newline)) (setq start (point)) (if warning-prefix-function (setq level-info (funcall warning-prefix-function @@ -264,7 +268,7 @@ See also `warning-series', `warning-prefix-function' and (insert (format (nth 1 level-info) (format warning-type-format typename)) message) - (newline) + (funcall newline) (when (and warning-fill-prefix (not (string-match "\n" message))) (let ((fill-prefix warning-fill-prefix) (fill-column 78))