]> git.eshelyaron.com Git - emacs.git/commitdiff
Undo last change
authorGerd Moellmann <gerd@gnu.org>
Tue, 12 Sep 2000 09:10:56 +0000 (09:10 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 12 Sep 2000 09:10:56 +0000 (09:10 +0000)
because it breaks '(make-variable-buffer-local (defvar ...)'
which is used at least in dired.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 6e66abe504148be08b2f2b31f9f6c5156b668752..1f01ac65e8b7a7d47da42c90425ef17cf5b3428a 100644 (file)
@@ -1,3 +1,9 @@
+2000-09-11  Gerd Moellmann  <gerd@gnu.org>
+
+       * bytecomp.el (byte-compile-defvar): Undo last change
+       because it breaks '(make-variable-buffer-local (defvar ...)'
+       which is used at least in dired.
+
 2000-09-12  Kenichi Handa  <handa@etl.go.jp>
 
        * international/quail.el (quail-define-package): Docstring
index c58038ba2bb5d9b79cff7dc6066fb26c22f73eab..f0f24213d175f12c736d9e7f1f14431d53d14c38 100644 (file)
@@ -3220,16 +3220,19 @@ If FORM is a lambda or a macro, byte-compile it as a function."
        (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))