1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-15 17:00:26 +00:00

(undigestify-rmail-message): If in summary, switch to the Rmail buffer.

(unforward-rmail-message): Simplify using with-current-buffer.
This commit is contained in:
Richard M. Stallman 1997-12-26 10:48:47 +00:00
parent 1eff0ba1b7
commit add0c45488

View File

@ -35,6 +35,7 @@
"Break up a digest message into its constituent messages.
Leaves original message, deleted, before the undigestified messages."
(interactive)
(with-current-buffer rmail-buffer
(widen)
(let ((buffer-read-only nil)
(msg-string (buffer-substring (rmail-msgbeg rmail-current-message)
@ -131,7 +132,7 @@ Leaves original message, deleted, before the undigestified messages."
(cond (error
(narrow-to-region (point-min) (1+ (point-max)))
(delete-region (point-min) (point-max))
(rmail-show-message rmail-current-message))))))
(rmail-show-message rmail-current-message)))))))
;;;###autoload
(defun unforward-rmail-message ()
@ -139,14 +140,8 @@ Leaves original message, deleted, before the undigestified messages."
This puts the forwarded message into a separate rmail message
following the containing message."
(interactive)
;; Don't use save-excursion because we don't want to restore point
;; in the case where we do not switch buffers.
(let ((obuf (current-buffer)))
(unwind-protect
(progn
;; If we are in a summary buffer, switch to the Rmail buffer.
(if (local-variable-p 'rmail-buffer)
(set-buffer rmail-buffer))
(with-current-buffer rmail-buffer
(narrow-to-region (rmail-msgbeg rmail-current-message)
(rmail-msgend rmail-current-message))
(goto-char (point-min))
@ -178,8 +173,7 @@ following the containing message."
(rmail-show-message n)
(if (rmail-summary-exists)
(rmail-select-summary
(rmail-update-summary))))))
(set-buffer obuf))))
(rmail-update-summary)))))))
(provide 'undigest)