=== modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-08-04 00:58:07 +0000 +++ lisp/net/rcirc.el 2011-08-17 13:43:29 +0000 @@ -149,7 +149,9 @@ maximum frame width." :type '(choice (const :tag "Value of `fill-column'") (const :tag "Full frame width" frame-width) - (integer :tag "Number of columns")) + (const :tag "Full window width" window-width) + (integer :tag "Number of columns") + (function :tag "Return value of function" function)) :group 'rcirc) (defcustom rcirc-fill-prefix nil @@ -2421,13 +2423,16 @@ (let ((fill-prefix (or rcirc-fill-prefix (make-string (- (point) (line-beginning-position)) ?\s))) - (fill-column (- (cond ((eq rcirc-fill-column 'frame-width) - (1- (frame-width))) - (rcirc-fill-column - rcirc-fill-column) - (t fill-column)) - ;; make sure ... doesn't cause line wrapping - 3))) + (fill-column + (cond ((eq rcirc-fill-column 'frame-width) + (1- (frame-width))) + ((eq rcirc-fill-column 'window-width) + (1- (window-width))) + ((fboundp rcirc-fill-column) ; custom function + (funcall rcirc-fill-column sender response)) + (rcirc-fill-column ; fix integer value + rcirc-fill-column) + (t fill-column)))) (fill-region (point) (point-max) nil t)))) ;;; handlers