Mercurial > hg > xemacs-beta
changeset 4304:4ac3a83867c6
[xemacs-hg @ 2007-12-04 20:35:30 by aidan]
Make compiled #'custom-declare-variable forms compatible with 21.4.
author | aidan |
---|---|
date | Tue, 04 Dec 2007 20:35:31 +0000 |
parents | cee827542370 |
children | 2bb3630ea397 |
files | lisp/ChangeLog lisp/bytecomp.el |
diffstat | 2 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@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. + 2007-12-04 Aidan Kehoe <kehoea@parhasard.net> * mule/iso-with-esc.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