comparison lisp/bytecomp.el @ 1672:3776a1115180

[xemacs-hg @ 2003-09-09 13:37:19 by michaels] 2003-09-06 Mike Sperber <mike@xemacs.org> * bytecomp.el (byte-compile-defvar-or-defconst): Actually implement the specified semantics for `defvar.'
author michaels
date Tue, 09 Sep 2003 13:37:19 +0000
parents 5365af805d4c
children 701dcae521bd
comparison
equal deleted inserted replaced
1671:9d167c4ea047 1672:3776a1115180
3929 (if (cdr (cdr form)) ; `value' provided 3929 (if (cdr (cdr form)) ; `value' provided
3930 (if (eq fun 'defconst) 3930 (if (eq fun 'defconst)
3931 ;; `defconst' sets `var' unconditionally. 3931 ;; `defconst' sets `var' unconditionally.
3932 `(setq ,var ,value) 3932 `(setq ,var ,value)
3933 ;; `defvar' sets `var' only when unbound. 3933 ;; `defvar' sets `var' only when unbound.
3934 `(if (not (boundp ',var)) (setq ,var ,value)))) 3934 `(if (not (default-boundp ',var)) (set-default ',var ,value))))
3935 `',var)))) 3935 `',var))))
3936 3936
3937 (defun byte-compile-autoload (form) 3937 (defun byte-compile-autoload (form)
3938 (and (byte-compile-constp (nth 1 form)) 3938 (and (byte-compile-constp (nth 1 form))
3939 (byte-compile-constp (nth 5 form)) 3939 (byte-compile-constp (nth 5 form))