1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

(rmail-duplicate-message): Make it work.

This commit is contained in:
Glenn Morris 2009-02-05 07:38:56 +00:00
parent 393439a343
commit 50dcb7845f
2 changed files with 23 additions and 11 deletions

View File

@ -12,7 +12,8 @@
2009-02-05 Glenn Morris <rgm@gnu.org> 2009-02-05 Glenn Morris <rgm@gnu.org>
* mail/rmail.el (rmail-what-message): Unbreak it. * mail/rmail.el (rmail-what-message, rmail-duplicate-message):
Make these functions work.
* net/mairix.el (rmail-buffer): Remove unneeded eval-when-compile. * net/mairix.el (rmail-buffer): Remove unneeded eval-when-compile.
(rmail-narrow-to-non-pruned-header): Remove autoload. (rmail-narrow-to-non-pruned-header): Remove autoload.

View File

@ -1442,16 +1442,27 @@ Hook `rmail-quit-hook' is run after expunging."
The duplicate copy goes into the Rmail file just after the The duplicate copy goes into the Rmail file just after the
original copy." original copy."
(interactive) (interactive)
(widen) ;; If we are in a summary buffer, switch to the Rmail buffer.
(let ((buffer-read-only nil) (set-buffer rmail-buffer)
(number rmail-current-message) (let ((buff (current-buffer))
(string (buffer-substring (rmail-msgbeg rmail-current-message) (n rmail-current-message)
(rmail-msgend rmail-current-message)))) (beg (rmail-msgbeg rmail-current-message))
(goto-char (rmail-msgend rmail-current-message)) (end (rmail-msgend rmail-current-message)))
(insert string) (if (rmail-buffers-swapped-p) (set-buffer rmail-view-buffer))
(rmail-forget-messages) (widen)
(rmail-show-message-maybe number) (let ((buffer-read-only nil)
(message "Message duplicated"))) (string (buffer-substring-no-properties beg end)))
(goto-char end)
(insert string))
(set-buffer buff)
(rmail-swap-buffers-maybe)
(goto-char (point-max))
(rmail-set-message-counters)
(set-buffer-modified-p t)
(rmail-show-message n))
(if (rmail-summary-exists)
(rmail-select-summary (rmail-update-summary)))
(message "Message duplicated"))
;;;###autoload ;;;###autoload
(defun rmail-input (filename) (defun rmail-input (filename)