[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/erc/erc-fill.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/erc/erc-fill.el,v |
Date: |
Mon, 20 Nov 2006 06:50:31 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 06/11/20 06:50:29
Index: lisp/erc/erc-fill.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/erc/erc-fill.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- lisp/erc/erc-fill.el 12 Feb 2006 20:25:00 -0000 1.2
+++ lisp/erc/erc-fill.el 20 Nov 2006 06:50:28 -0000 1.3
@@ -122,7 +122,15 @@
You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
(unless (erc-string-invisible-p (buffer-substring (point-min) (point-max)))
(when erc-fill-function
- (funcall erc-fill-function))))
+ ;; skip initial empty lines
+ (goto-char (point-min))
+ (save-match-data
+ (while (and (looking-at "[ \t\n]*$")
+ (= (forward-line 1) 0))))
+ (unless (eobp)
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (funcall erc-fill-function))))))
(defun erc-fill-static ()
"Fills a text such that messages start at column `erc-fill-static-center'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/erc/erc-fill.el,v,
Miles Bader <=