summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorTeodor Zlatanov <tzz@lifelogs.com>2011-10-18 14:10:52 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-10-18 14:10:52 +0000
commit97d0a92c79a5190291ae46dac668b0031ce6fe64 (patch)
tree9232c000a9795d2f9ba0edf32f2a9b088977af64 /lisp/gnus
parent6978a1514a25ddf2191e9d425aa5450a6d31865c (diff)
Merge changes made in Gnus trunk.
gnus-util.el (gnus-bound-and-true-p): Macro for XEmacs compatibility. nnir.el (nnir-mode): Use it. nnmairix.el (nnmairix-determine-original-group-from-registry): Use it. nnir.el (gnus-registry-enabled): Defvar to keep the compiler happy. nnmairix.el (gnus-registry-enabled): Ditto.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog10
-rw-r--r--lisp/gnus/gnus-util.el8
-rw-r--r--lisp/gnus/nnir.el4
-rw-r--r--lisp/gnus/nnmairix.el5
4 files changed, 25 insertions, 2 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 15e6a8061c..b7f41e22e5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,13 @@
+2011-10-18 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-util.el (gnus-bound-and-true-p): Macro for XEmacs compatibility.
+ * nnir.el (nnir-mode): Use it.
+ * nnmairix.el (nnmairix-determine-original-group-from-registry):
+ Use it.
+
+ * nnir.el (gnus-registry-enabled): Defvar to keep the compiler happy.
+ * nnmairix.el (gnus-registry-enabled): Ditto.
+
2011-10-17 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-enabled): Add new variable.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index e9d6ba423f..9c5e6e8312 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1986,6 +1986,14 @@ definitions to shadow the loaded ones for use in file byte-compilation."
(gnus-macroexpand-all expanded environment)))
form))))
+(eval-when-compile
+ ;; This is unnecessary in the compiled version as it is a macro.
+ (if (fboundp 'bound-and-true-p)
+ (defalias 'gnus-bound-and-true-p 'bound-and-true-p)
+ (defmacro gnus-bound-and-true-p (var)
+ "Return the value of symbol VAR if it is bound, else nil."
+ `(and (boundp (quote ,var)) ,var))))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index cbd3f743b3..2d3c05864e 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -292,6 +292,8 @@ is `(valuefunc member)'."
(autoload 'nnimap-make-thread-query "nnimap")
(autoload 'gnus-registry-action "gnus-registry"))
+;; Suppress byte-compiler warning `reference to free variable'
+(defvar gnus-registry-enabled)
(nnoo-declare nnir)
(nnoo-define-basics nnir)
@@ -1740,7 +1742,7 @@ environment unless `not-global' is non-nil."
(when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
(setq gnus-summary-line-format
(or nnir-summary-line-format gnus-summary-line-format))
- (when (bound-and-true-p gnus-registry-enabled)
+ (when (gnus-bound-and-true-p gnus-registry-enabled)
(remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index f81aa03c26..1bf28c5d32 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -605,6 +605,9 @@ Other back ends might or might not work.")
;; Silence byte-compiler.
(autoload 'gnus-registry-get-id-key "gnus-registry")
+;; Suppress byte-compiler warning `reference to free variable'
+(defvar gnus-registry-enabled)
+
(deffoo nnmairix-request-set-mark (group actions &optional server)
(when server
(nnmairix-open-server server))
@@ -1635,7 +1638,7 @@ search in raw mode."
(defun nnmairix-determine-original-group-from-registry (mid)
"Try to determinale original group for message-id MID from the registry."
- (when (bound-and-true-p gnus-registry-enabled)
+ (when (gnus-bound-and-true-p gnus-registry-enabled)
(unless (string-match "^<" mid)
(set mid (concat "<" mid)))
(unless (string-match ">$" mid)