[COMMIT] Make compiled #'custom-declare-variable forms compatible
with 21.4.
Aidan Kehoe
kehoea at parhasard.net
Tue Dec 4 15:37:58 EST 2007
Ar an dara lá de mí na Nollaig, scríobh Vin Shelton:
> The bytecompiler is not my specialty, but I can say that the patch
> allows 21.5 to produce a set of packages that can be loaded in 21.4.
> In particular, the jka-compr problem is gone.
>
> I recommend you submit this patch to xemacs-patches and commit it.
Done. Thank you.
APPROVE COMMIT
NOTE: This patch has been committed.
lisp/ChangeLog addition:
2007-12-03 Aidan Kehoe <kehoea at parhasard.net>
* bytecomp.el (byte-compile-file-form-custom-declare-variable):
Instead of using a keyword argument that's incompatible with 21.4,
modify the byte compiled init code to change the variable's
standard-value property itself.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/bytecomp.el
===================================================================
RCS
Index: lisp/bytecomp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/bytecomp.el,v
retrieving revision 1.22
diff -u -u -r1.22 bytecomp.el
--- lisp/bytecomp.el 2007/12/01 13:40:07 1.22
+++ lisp/bytecomp.el 2007/12/04 20:34:57
@@ -2405,10 +2405,17 @@
;; And save a value to be examined in the custom UI, if that differs
;; from the init value.
(unless (equal to-examine (car-safe (cdr (third form))))
- (setf (nthcdr 4 form) (nconc
- (list :default
- (list 'quote to-examine))
- (nthcdr 4 form)))))
+ (setcdr (third form)
+ (list (byte-compile-top-level
+ ;; This is ugly. custom-declare-variable errors if
+ ;; it's passed a keyword it doesn't know about, and
+ ;; so to make this code run on 21.4, we add code to
+ ;; modify the standard-value property to the
+ ;; byte-compiled value for DEFAULT.
+ `(prog2 (put ,(second form) 'standard-value
+ '(,to-examine))
+ ,to-examine)
+ nil 'file)))))
form))
;;;###autoload
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
More information about the XEmacs-Beta
mailing list