diff options
-rw-r--r-- | lisp/gnus/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/gnus/gnus-msg.el | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d7ebedc53f8..2dbe85b2aac 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2004-11-07 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-msg.el (gnus-configure-posting-styles): Don't cause the + "Args out of range" error. Reported by Arnaud Giersch + <arnaud.giersch@free.fr>. + 2004-11-04 Richard M. Stallman <rms@gnu.org> * spam.el (spam group): Add :version. diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 6b093480940..7948efc2572 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1871,11 +1871,13 @@ this is a reply." (when (and filep v) (setq v (with-temp-buffer (insert-file-contents v) - (goto-char (point-max)) - (skip-chars-backward "\n") - (delete-region (+ (point) (if (bolp) 0 1)) - (point-max)) - (buffer-string)))) + (buffer-substring + (point-min) + (progn + (goto-char (point-max)) + (if (zerop (skip-chars-backward "\n")) + (point) + (1+ (point)))))))) (setq results (delq (assoc element results) results)) (push (cons element v) results)))) ;; Now we have all the styles, so we insert them. |