diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-11-29 01:40:15 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-11-29 01:40:15 -0500 |
commit | 18c1bbf68271e297351a718ce0d5c55b30d7305c (patch) | |
tree | 21c50a3ff6c340fcbe617899dff735bcb9f67f7c | |
parent | 5105d30dd2d6b4c3750995554f6e655113b9c6ea (diff) | |
download | emacs.d-18c1bbf68271e297351a718ce0d5c55b30d7305c.tar.gz |
Flip numbering default in snip-mail-quote
-rw-r--r-- | lisp/init-gnus.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index e2156d7..d578116 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -177,19 +177,19 @@ 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 no-number quote-char) +(defun km/snip-mail-quote (beg end &optional number quote-char) "Replace region lines with \"[n lines ...]\". -If NO-NUMBER is non-nil (or when called interactively with a -prefix argument), the number of lines is not added. The default +If NUMBER is non-nil (or when called interactively with a prefix +argument), add the number of lines that were snipped. 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) - (if no-number - (insert (format "[...]")) - (insert (format "[%d line%s ...]" nlines (if (= 1 nlines) "" "s")))) + (if number + (insert (format "[%d line%s ...]" nlines (if (= 1 nlines) "" "s"))) + (insert (format "[...]"))) (search-backward "[") (unless (bolp) (newline)) |