[gnus git] branch master updated: m0-5-148-g7bc5189 =1= XEmacs 21.5 compilation fix

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  7bc51898804084cd903509a0420bbe93c2846f06 (commit)
      from  7064a5391faea8140cfb60959bbc9dfcdd318780 (commit)


- Log -----------------------------------------------------------------
commit 7bc51898804084cd903509a0420bbe93c2846f06
Author: Katsumi Yamaoka <[email protected]>
Date:   Wed Oct 24 00:25:44 2012 +0000

    XEmacs 21.5 compilation fix
    
    * dgnushack.el (define-obsolete-variable-alias): Add a compiler-marco
      and a runtime function for it, of which the XEmacs version takes only
     two arguments.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c636ffa..a617f4f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-24  Katsumi Yamaoka  <[email protected]>
+
+	* dgnushack.el (define-obsolete-variable-alias): Add a compiler-marco
+	and a runtime function for it, of which the XEmacs version takes only
+	two arguments.
+
 2012-10-23  Stefan Monnier  <[email protected]>
 
 	* nndiary.el (nndiary-request-create-group-functions)
diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el
index 19f253a..6bbde42 100644
--- a/lisp/dgnushack.el
+++ b/lisp/dgnushack.el
@@ -565,4 +565,25 @@ but which should be robust in the unexpected case that an error is signaled."
 	   (progn ,@body)
 	 (error (message "Error: %S" ,err) nil)))))
 
+;; XEmacs's `define-obsolete-variable-alias' takes only two arguments:
+;; (define-obsolete-variable-alias OLDVAR NEWVAR)
+(condition-case nil
+    (progn
+      (defvar dgnushack-obsolete-name nil)
+      (defvar dgnushack-current-name nil)
+      (unwind-protect
+	  (define-obsolete-variable-alias 'obsolete-name 'current-name "0")
+	(makunbound 'dgnushack-obsolete-name)
+	(makunbound 'dgnushack-current-name)))
+  (wrong-number-of-arguments
+   (define-compiler-macro
+     define-obsolete-variable-alias (oldvar newvar &rest args)
+     `(funcall ,(symbol-function 'define-obsolete-variable-alias)
+	       ,oldvar ,newvar))
+   (defadvice define-obsolete-variable-alias (around ignore-rest-args
+						     (oldvar newvar &rest args)
+						     activate)
+     "Ignore arguments other than the 1st and the 2nd ones."
+     (ad-Orig-define-obsolete-variable-alias oldvar newvar))))
+
 ;;; dgnushack.el ends here

-----------------------------------------------------------------------
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    |    6 ++++++
 lisp/dgnushack.el |   21 +++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 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.