Mercurial > emacs
changeset 76634:98c3595cace4
(compose-mail): Run switch-function after setting up the mail buffer.
(switch-to-completions): No error if search for \n\n fails.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 Mar 2007 16:23:47 +0000 |
parents | 32db7e65b617 |
children | 5e37a1934d22 |
files | lisp/simple.el |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Mar 20 16:23:09 2007 +0000 +++ b/lisp/simple.el Tue Mar 20 16:23:47 2007 +0000 @@ -4726,9 +4726,16 @@ Each action has the form (FUNCTION . ARGS)." (interactive (list nil nil nil current-prefix-arg)) - (let ((function (get mail-user-agent 'composefunc))) - (funcall function to subject other-headers continue - switch-function yank-action send-actions))) + (let ((function (get mail-user-agent 'composefunc)) + result-buffer) + (if switch-function + (save-window-excursion + (prog1 + (funcall function to subject other-headers continue + nil yank-action send-actions) + (funcall switch-function (current-buffer)))) + (funcall function to subject other-headers continue + nil yank-action send-actions)))) (defun compose-mail-other-window (&optional to subject other-headers continue yank-action send-actions) @@ -5165,7 +5172,7 @@ (when window (select-window window) (goto-char (point-min)) - (search-forward "\n\n") + (search-forward "\n\n" nil t) (forward-line 1)))) ;;; Support keyboard commands to turn on various modifiers.