From: Katsumi Yamaoka Date: Sun, 7 Nov 2004 23:56:10 +0000 (+0000) Subject: (gnus-configure-posting-styles): Don't cause the "Args out of range" error. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=79719a5324668cf05d7d6eb1b683c872f61af533 (gnus-configure-posting-styles): Don't cause the "Args out of range" error. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be44ad20f..1fb1f527e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-11-07 Katsumi Yamaoka + + * gnus-msg.el (gnus-configure-posting-styles): Don't cause the + "Args out of range" error. Reported by Arnaud Giersch + . + 2004-11-07 Jesper Harder * gnus-sum.el (gnus-summary-clear-local-variables): Use symbolp. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 518cff243..5087e6516 100644 --- a/lisp/gnus-msg.el +++ b/lisp/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.