[gnus git] branch master updated: n0-17-352-g9792cc2 =1= Add gnus-bound-and-true-p macro for XEmacs compatibility and use it in nnir.el and nnmairix.el.

Ted Zlatanov <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  9792cc2125ceae51815ce169a75add38b0d5644d (commit)
      from  f7b7e1594e227fd196b0c01c98cbb6db9db0dd94 (commit)


- Log -----------------------------------------------------------------
commit 9792cc2125ceae51815ce169a75add38b0d5644d
Author: Ted Zlatanov <[email protected]>
Date:   Tue Oct 18 09:33:39 2011 -0400

    Add gnus-bound-and-true-p macro for XEmacs compatibility and use it in nnir.el and nnmairix.el.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e2a51cc..433c34c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
 2011-10-18  Teodor Zlatanov  <[email protected]>
 
+	* 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.
 
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index e9d6ba4..9c5e6e8 100644
--- a/lisp/gnus-util.el
+++ b/lisp/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/nnir.el b/lisp/nnir.el
index b03c9e4..2d3c058 100644
--- a/lisp/nnir.el
+++ b/lisp/nnir.el
@@ -1742,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/nnmairix.el b/lisp/nnmairix.el
index 17b42fa..1bf28c5 100644
--- a/lisp/nnmairix.el
+++ b/lisp/nnmairix.el
@@ -1638,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)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog    |    5 +++++
 lisp/gnus-util.el |    8 ++++++++
 lisp/nnir.el      |    2 +-
 lisp/nnmairix.el  |    2 +-
 4 files changed, 15 insertions(+), 2 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.