ad-do-it (was Re: XEmacs Packages have been pre-released (2010-07-05-14))

Stephen J. Turnbull stephen at xemacs.org
Tue Jul 6 03:02:32 EDT 2010


Katsumi Yamaoka writes:
 > Norbert Koch wrote:
 > > New Packages in Pre-Release:
 > > ===========================
 > > xemacs-base-2.26-pkg.tar.gz             upstream version: none
 > 
 > advice.el the new xemacs-base package contains looks funny:
 > 
 > $ xemacs-21.4.22 -q -batch -l ./advice.elc -l ./test.el
 > Symbol's value as variable is void: ad-do-it
 > xemacs exiting

Yeah, the code looks funny, too. ;-)  It looks to me whoever wrote that
patch reversed the arguments to nsubst in two places.  You could try
this patch (my own version of advice is hacked so you should get an
offset, but no fuzz, from patch).

Untested and not really recommended unless you're in a very big hurry.<wink>

Index: advice.el
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/xemacs-base/advice.el,v
retrieving revision 1.3
diff -u -r1.3 advice.el
@@ -2797,7 +2813,7 @@
 	       index arglist)
       (if (= (length set-forms) 1)
 	  ;; For exactly one set-form we can use values-form directly,...
-          (nsubst 'ad-vAlUeS values-form (car set-forms))
+          (nsubst values-form 'ad-vAlUeS (car set-forms))
 	;; ...if we have more we have to bind it to a variable:
 	(` (let ((ad-vAlUeS (, values-form)))
 	     (,@ (reverse set-forms))
@@ -3092,7 +3108,7 @@
       (if (ad-advice-protected advice)
 	  (setq around-form-protected t))
       (setq around-form
-            (nsubst 'ad-do-it around-form 
+            (nsubst around-form 'ad-do-it
                     (ad-prognify
                      (ad-body-forms (ad-advice-definition advice))))))
     (setq after-forms



More information about the XEmacs-Beta mailing list