From 5d5afbcdea4bd86dc1c8083c23b02b8d6298b9cb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 20 Mar 2007 16:24:03 +0000 Subject: [PATCH] (compose-mail): Run switch-function after setting up the mail buffer. (switch-to-completions): No error if search for \n\n fails. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/simple.el | 15 +++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31621363d53..705642dc7f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2007-03-20 Richard Stallman + + * textmodes/ispell.el (ispell-call-process): New function. + Defends against bad `default-directory.' + (ispell-check-version, ispell-find-aspell-dictionaries) + (ispell-get-aspell-config-value, lookup-words): Call it. + (ispell-call-process-region): New function. + (ispell-send-string): Call it. + 2007-03-20 Andreas Schwab * Makefile.in (custom-deps): Depend on $(lisp)/subdirs.el. @@ -52,6 +61,9 @@ * files.el (default-directory): Mark safe. (basic-save-buffer-2): Put proper dir name in error message. + * simple.el (compose-mail): Run switch-function after + setting up the mail buffer. + * startup.el (inhibit-splash-screen, initial-major-mode): Doc fixes. 2007-03-18 Jay Belanger @@ -94,6 +106,10 @@ * autorevert.el (auto-revert-tail-handler): Call after-revert-hook. +2007-03-17 Ryan Yeske + + * simple.el (switch-to-completions): No error if search for \n\n fails. + 2007-03-17 Chong Yidong * simple.el (line-move-1): Respect diff --git a/lisp/simple.el b/lisp/simple.el index 5bbfa317958..6871993d2b7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4726,9 +4726,16 @@ SEND-ACTIONS is a list of actions to call when the message is sent. 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 @@ select the completion near point.\n\n")))))) (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. -- 2.39.5