changeset 51737:10cd0bec4a7f

(byte-compile-defvar): Check and set the default value of the variable. (byte-code-meter): Move declaration to top level.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 04 Jul 2003 23:47:48 +0000
parents 3c7354593959
children 06dc2c7d15f7
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Fri Jul 04 23:30:29 2003 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Fri Jul 04 23:47:48 2003 +0000
@@ -1,6 +1,6 @@
 ;;; bytecomp.el --- compilation of Lisp code into byte code
 
-;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002
+;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, 2003
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Jamie Zawinski <jwz@lucid.com>
@@ -10,7 +10,7 @@
 
 ;;; This version incorporates changes up to version 2.10 of the
 ;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.133 $")
+(defconst byte-compile-version "$Revision: 2.134 $")
 
 ;; This file is part of GNU Emacs.
 
@@ -3614,7 +3614,7 @@
 		`(funcall '(lambda (,tmp) (defconst ,var ,tmp))
 			  ,value))
 	    ;; `defvar' sets `var' only when unbound.
-	    `(if (not (boundp ',var)) (setq ,var ,value)))
+	    `(if (not (default-boundp ',var)) (setq-default ,var ,value)))
 	(when (eq fun 'defconst)
 	  ;; This will signal an appropriate error at runtime.
 	  `(eval ',form)))
@@ -3984,8 +3984,8 @@
 
 ;;; report metering (see the hacks in bytecode.c)
 
+(defvar byte-code-meter)
 (defun byte-compile-report-ops ()
-  (defvar byte-code-meter)
   (with-output-to-temp-buffer "*Meter*"
     (set-buffer "*Meter*")
     (let ((i 0) n op off)