summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-09-12 09:10:56 +0000
committerGerd Moellmann <gerd@gnu.org>2000-09-12 09:10:56 +0000
commit71246c2c413eb58740c779dce6b2cc37602252a6 (patch)
treeb534cb250174dd28c8cbd70e0c11e561fc018956 /lisp/emacs-lisp
parent54fa5bc13a7110099c180fa0e597359b93f485b3 (diff)
downloademacs-71246c2c413eb58740c779dce6b2cc37602252a6.tar.gz
Undo last change
because it breaks '(make-variable-buffer-local (defvar ...)' which is used at least in dired.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c58038ba2bb..f0f24213d17 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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))