+2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.el (message-elide-ellipsis): Document the format specs in the
+ ellipsis.
+
+2011-03-15 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * message.el (message-elide-region): Allow the ellipsis to say how many
+ lines were removed.
+
2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-win.el (gnus-configure-frame): Protect against trying to restore
(require 'mail-parse)
(require 'mml)
(require 'rfc822)
+(require 'format-spec)
(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
: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)
An ellipsis (from `message-elide-ellipsis') will be inserted where the
text was killed."
(interactive "r")
- (kill-region b e)
- (insert message-elide-ellipsis))
+ (let ((lines (count-lines b e))
+ (chars (- e b)))
+ (kill-region b e)
+ (insert (format-spec message-elide-ellipsis
+ `((?l . ,lines)
+ (?c . ,chars))))))
(defvar message-caesar-translation-table nil)