Function: message-delete-not-region
message-delete-not-region is an interactive and byte-compiled function
defined in message.el.gz.
Signature
(message-delete-not-region BEG END)
Documentation
Delete everything in the body of the current message outside of the region.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-delete-not-region (beg end)
"Delete everything in the body of the current message outside of the region."
(interactive "r" message-mode)
(let (citeprefix)
(save-excursion
(goto-char beg)
;; snarf citation prefix, if appropriate
(unless (eq (point) (progn (beginning-of-line) (point)))
(when (looking-at message-cite-prefix-regexp)
(setq citeprefix (match-string 0))))
(goto-char end)
(delete-region (point) (if (not (message-goto-signature))
(point)
(forward-line -2)
(point)))
(insert "\n")
(goto-char beg)
(delete-region beg (progn (message-goto-body)
(forward-line 2)
(point)))
(when citeprefix
(insert citeprefix))))
(when (message-goto-signature)
(forward-line -2)))