# HG changeset patch # User aidan # Date 1196800531 0 # Node ID 4ac3a83867c63483fe7ffa0080d3fc604bab9c20 # Parent cee827542370fcf904f4f27b03075f7421ecdc44 [xemacs-hg @ 2007-12-04 20:35:30 by aidan] Make compiled #'custom-declare-variable forms compatible with 21.4. diff -r cee827542370 -r 4ac3a83867c6 lisp/ChangeLog --- a/lisp/ChangeLog Tue Dec 04 20:18:43 2007 +0000 +++ b/lisp/ChangeLog Tue Dec 04 20:35:31 2007 +0000 @@ -1,3 +1,10 @@ +2007-12-03 Aidan Kehoe + + * 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. + 2007-12-04 Aidan Kehoe * mule/iso-with-esc.el: diff -r cee827542370 -r 4ac3a83867c6 lisp/bytecomp.el --- a/lisp/bytecomp.el Tue Dec 04 20:18:43 2007 +0000 +++ b/lisp/bytecomp.el Tue Dec 04 20:35:31 2007 +0000 @@ -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