From: yamaoka Date: Sun, 16 Nov 2003 21:55:46 +0000 (+0000) Subject: Synch to Gnus 200311162041. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f79c1bc5deebf8d629ac039e94c6fad5f149529c;p=elisp%2Fgnus.git- Synch to Gnus 200311162041. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 426e581..e85ee42 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-11-16 Jesper Harder + + * gnus.el (gnus-getenv-nntpserver): Fix regexp and simplify. + Reported by Artem Chuprina . + 2003-11-14 Simon Josefsson * mm-util.el (mm-charset-synonym-alist): Map BIG5-HKSCS to BIG5 diff --git a/lisp/gnus.el b/lisp/gnus.el index 4d5fe91..bc4db72 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1130,21 +1130,17 @@ used to 899, you would say something along these lines: :group 'gnus-server :type 'file) -;; This function is used to check both the environment variable -;; NNTPSERVER and the /etc/nntpserver file to see whether one can find -;; an nntp server name default. (defun gnus-getenv-nntpserver () + "Find default nntp server. +Check the NNTPSERVER environment variable and the +`gnus-nntpserver-file' file." (or (getenv "NNTPSERVER") (and (file-readable-p gnus-nntpserver-file) - (save-excursion - (set-buffer (gnus-get-buffer-create " *gnus nntp*")) + (with-temp-buffer (insert-file-contents gnus-nntpserver-file) (let ((name (buffer-string))) - (prog1 - (if (string-match "\\'[ \t\n]*$" name) - nil - name) - (kill-buffer (current-buffer)))))))) + (unless (string-match "\\`[ \t\n]*$" name) + name)))))) (defcustom gnus-select-method (condition-case nil