From 47363eee213cc78bed959ed06c8f53d84c4bc4cf Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 26 Jan 2014 16:32:29 -0500 Subject: Control mail snip number with prefix argument --- lisp/init-gnus.el | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.3