changeset 31552:f17ccd7f6253

Undo last change because it breaks '(make-variable-buffer-local (defvar ...)' which is used at least in dired.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 12 Sep 2000 09:10:29 +0000
parents 0c59df4bb114
children c26265a22302
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Tue Sep 12 02:30:13 2000 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Tue Sep 12 09:10:29 2000 +0000
@@ -3220,16 +3220,19 @@
 	(setq byte-compile-bound-variables
 	      (cons var byte-compile-bound-variables)))
     (byte-compile-body-do-effect
-     (list
-      ;; Just as a real defvar would, but only in top-level forms.
-      (when (null byte-compile-current-form)
-	`(push ',var current-load-list))
-      (when (and string (null byte-compile-current-form))
-	`(put ',var 'variable-documentation ,string))
-      (if (cdr (cdr form))
-	  (if (eq (car form) 'defconst)
-	      `(setq ,var ,value)
-	    `(if (boundp ',var) ',var (setq ,var ,value))))))))
+     (list (if (cdr (cdr form))
+	       (if (eq (car form) 'defconst)
+		   (list 'setq var value)
+		 (list 'or (list 'boundp (list 'quote var))
+		       (list 'setq var value))))
+	   ;; Put the defined variable in this library's load-history entry
+	   ;; just as a real defvar would.
+	   (list 'setq 'current-load-list
+		 (list 'cons (list 'quote var)
+		       'current-load-list))
+	   (if string
+	       (list 'put (list 'quote var) ''variable-documentation string))
+	   (list 'quote var)))))
 
 (defun byte-compile-autoload (form)
   (and (byte-compile-constp (nth 1 form))