summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-25 04:57:07 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-25 04:57:07 +0000
commit94c5913c19e4cb205902fc20352373dc9bd5eda2 (patch)
tree68abfaea9245cc21cf9a8ded90087169ba972f54
parent3c395710695349bb8c9bac651b6222c625b816ff (diff)
downloademacs-94c5913c19e4cb205902fc20352373dc9bd5eda2.tar.gz
Require cl at compile time.
(gnus-select-method): Use condition-case, not ignore-errors. (gnus-check-backend-function): Definition moved up.
-rw-r--r--lisp/gnus/gnus.el29
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 41cd7172558..e73b3f4438a 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -28,6 +28,8 @@
(eval '(run-hooks 'gnus-load-hook))
+(eval-when-compile (require 'cl))
+
(require 'custom)
(require 'gnus-load)
(require 'message)
@@ -771,7 +773,7 @@ used to 899, you would say something along these lines:
(kill-buffer (current-buffer))))))))
(defcustom gnus-select-method
- (ignore-errors
+ (condition-case nil
(nconc
(list 'nntp (or (ignore-errors
(gnus-getenv-nntpserver))
@@ -782,7 +784,8 @@ used to 899, you would say something along these lines:
(if (or (null gnus-nntp-service)
(equal gnus-nntp-service "nntp"))
nil
- (list gnus-nntp-service))))
+ (list gnus-nntp-service)))
+ (error nil))
"Default method for selecting a newsgroup.
This variable should be a list, where the first element is how the
news is to be fetched, the second is the address.
@@ -1966,6 +1969,17 @@ If ARG, insert string at point."
;;; More various functions.
+(defsubst gnus-check-backend-function (func group)
+ "Check whether GROUP supports function FUNC.
+GROUP can either be a string (a group name) or a select method."
+ (ignore-errors
+ (let ((method (if (stringp group)
+ (car (gnus-find-method-for-group group))
+ group)))
+ (unless (featurep method)
+ (require method))
+ (fboundp (intern (format "%s-%s" method func))))))
+
(defun gnus-group-read-only-p (&optional group)
"Check whether GROUP supports editing or not.
If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
@@ -2455,17 +2469,6 @@ If NEWSGROUP is nil, return the global kill file name instead."
(t
(gnus-server-add-address method)))))))
-(defsubst gnus-check-backend-function (func group)
- "Check whether GROUP supports function FUNC.
-GROUP can either be a string (a group name) or a select method."
- (ignore-errors
- (let ((method (if (stringp group)
- (car (gnus-find-method-for-group group))
- group)))
- (unless (featurep method)
- (require method))
- (fboundp (intern (format "%s-%s" method func))))))
-
(defun gnus-methods-using (feature)
"Find all methods that have FEATURE."
(let ((valids gnus-valid-select-methods)