[gnus git] branch master updated: n0-13-112-g698d90d =1= (message-elide-ellipsis): Document the format specs in the ellipsis.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 698d90dfd2f1ddb5789c7a3fef3064dfe08a0c81 (commit)
from e4829ab95d1a0d3764b6c4e860877a1b0c17c670 (commit)
- Log -----------------------------------------------------------------
commit 698d90dfd2f1ddb5789c7a3fef3064dfe08a0c81
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Mar 15 20:37:01 2011 +0100
(message-elide-ellipsis): Document the format specs in the ellipsis.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 398086d..0e5895a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
2011-03-15 Lars Magne Ingebrigtsen <[email protected]>
+ * message.el (message-elide-ellipsis): Document the format specs in the
+ ellipsis.
+
+2011-03-15 Reiner Steib <[email protected]>
+
+ * message.el (message-elide-region): Allow the ellipsis to say how many
+ lines were removed.
+
+2011-03-15 Lars Magne Ingebrigtsen <[email protected]>
+
* gnus-win.el (gnus-configure-frame): Protect against trying to restore
window configurations containing buffers that are now dead.
diff --git a/lisp/message.el b/lisp/message.el
index c939303..198c5d8 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -49,6 +49,7 @@
(require 'mail-parse)
(require 'mml)
(require 'rfc822)
+(require 'format-spec)
(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
@@ -442,7 +443,10 @@ whitespace)."
:group 'message-various)
(defcustom message-elide-ellipsis "\n[...]\n\n"
- "*The string which is inserted for elided text."
+ "*The string which is inserted for elided text.
+This is a format-spec string, and you can use %l to say how many
+lines were removed, and %c to say how many characters were
+removed."
:type 'string
:link '(custom-manual "(message)Various Commands")
:group 'message-various)
@@ -3579,8 +3583,12 @@ Note that this should not be used in newsgroups."
An ellipsis (from `message-elide-ellipsis') will be inserted where the
text was killed."
(interactive "r")
+ (let ((lines (count-lines b e))
+ (chars (- e b)))
(kill-region b e)
- (insert message-elide-ellipsis))
+ (insert (format-spec message-elide-ellipsis
+ `((?l . ,lines)
+ (?c . ,chars))))))
(defvar message-caesar-translation-table nil)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 10 ++++++++++
lisp/message.el | 14 +++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project