summaryrefslogtreecommitdiff
path: root/lisp/init-gnus.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-01-26 16:32:29 -0500
committerKyle Meyer <kyle@kyleam.com>2014-01-26 16:32:29 -0500
commit47363eee213cc78bed959ed06c8f53d84c4bc4cf (patch)
tree5b719a89de205c41055757d4fc31b5595f04fc50 /lisp/init-gnus.el
parentf016978562b0acb231e32efa12757b36b61f234f (diff)
downloademacs.d-47363eee213cc78bed959ed06c8f53d84c4bc4cf.tar.gz
Control mail snip number with prefix argument
Diffstat (limited to 'lisp/init-gnus.el')
-rw-r--r--lisp/init-gnus.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el
index eae7311..b1a1c51 100644
--- a/lisp/init-gnus.el
+++ b/lisp/init-gnus.el
@@ -145,13 +145,13 @@ A new buffer with the patch contents is opened in another window."
;; Modified from
;; http://emacs-fu.blogspot.com/2008/12/some-simple-tricks-boxquote-footnote.html.
-(defun km/snip-mail-quote (beg end &optional quote-char no-number)
+(defun km/snip-mail-quote (beg end &optional no-number quote-char)
"Replace region lines with \"[n lines ...]\".
-
-The default QUOTE-CHAR is \">\". Text following the snipped lines
-is placed on a new line and the resulting paragraph is filled. If
-NO-NUMBER is non-nil, the number of lines is not added."
- (interactive "r")
+If NO-NUMBER is non-nil (or when called interactively with a
+prefix argument), the number of lines is not added. The default
+QUOTE-CHAR is \">\". Text following the snipped lines is placed
+on a new line and the resulting paragraph is filled."
+ (interactive "r\nP")
(let ((nlines (count-lines beg end))
(quote-char (or quote-char ">")))
(delete-region beg end)
@@ -171,12 +171,6 @@ NO-NUMBER is non-nil, the number of lines is not added."
(define-key message-mode-map
(kbd "C-c m s") 'km/snip-mail-quote)
-;; Without reporting the number of lines
-(define-key message-mode-map
- (kbd "C-c m S") '(lambda (beg end)
- (interactive "r")
- (km/snip-mail-quote beg end nil t)))
-
(add-hook 'gnus-summary-mode-hook
(lambda ()
(gnus-define-keys gnus-summary-mode-map