Mercurial > hg > xemacs-beta
comparison lisp/bytecomp.el @ 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 | 27150c937a22 |
children | e8f448f997ac |
comparison
equal
deleted
inserted
replaced
4303:cee827542370 | 4304:4ac3a83867c6 |
---|---|
2403 (setcdr (third form) | 2403 (setcdr (third form) |
2404 (list (byte-compile-top-level to-examine nil 'file))) | 2404 (list (byte-compile-top-level to-examine nil 'file))) |
2405 ;; And save a value to be examined in the custom UI, if that differs | 2405 ;; And save a value to be examined in the custom UI, if that differs |
2406 ;; from the init value. | 2406 ;; from the init value. |
2407 (unless (equal to-examine (car-safe (cdr (third form)))) | 2407 (unless (equal to-examine (car-safe (cdr (third form)))) |
2408 (setf (nthcdr 4 form) (nconc | 2408 (setcdr (third form) |
2409 (list :default | 2409 (list (byte-compile-top-level |
2410 (list 'quote to-examine)) | 2410 ;; This is ugly. custom-declare-variable errors if |
2411 (nthcdr 4 form))))) | 2411 ;; it's passed a keyword it doesn't know about, and |
2412 ;; so to make this code run on 21.4, we add code to | |
2413 ;; modify the standard-value property to the | |
2414 ;; byte-compiled value for DEFAULT. | |
2415 `(prog2 (put ,(second form) 'standard-value | |
2416 '(,to-examine)) | |
2417 ,to-examine) | |
2418 nil 'file))))) | |
2412 form)) | 2419 form)) |
2413 | 2420 |
2414 ;;;###autoload | 2421 ;;;###autoload |
2415 (defun byte-compile (form) | 2422 (defun byte-compile (form) |
2416 "If FORM is a symbol, byte-compile its function definition. | 2423 "If FORM is a symbol, byte-compile its function definition. |