CVS update by aidan xemacs/lisp ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Tue Dec 4 15:35:33 EST 2007


  User: aidan   
  Date: 07/12/04 21:35:33

  Modified:    xemacs/lisp ChangeLog bytecomp.el
Log:
Make compiled #'custom-declare-variable forms compatible with 21.4.

Revision  Changes    Path
1.870     +7 -0      XEmacs/xemacs/lisp/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.869
retrieving revision 1.870
diff -u -p -r1.869 -r1.870
--- ChangeLog	2007/12/04 20:18:40	1.869
+++ ChangeLog	2007/12/04 20:35:30	1.870
@@ -1,3 +1,10 @@
+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. 
+
 2007-12-04  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* mule/iso-with-esc.el:



1.23      +11 -4     XEmacs/xemacs/lisp/bytecomp.el

Index: bytecomp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/bytecomp.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- bytecomp.el	2007/12/01 13:40:07	1.22
+++ bytecomp.el	2007/12/04 20:35:31	1.23
@@ -2405,10 +2405,17 @@ list that represents a doc string refere
        ;; 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





More information about the XEmacs-CVS mailing list