summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-08-23 18:19:56 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-08-23 18:19:56 +0000
commit36e65f7059d02914f834cf925b98e5ce4b251af4 (patch)
treec361710fd690efc82f44ff5dee2572bc8fe2d1d4
parent78b35906a97051307f2a1da76fd9786331e3f3bf (diff)
downloademacs-36e65f7059d02914f834cf925b98e5ce4b251af4.tar.gz
(byte-compile-from-buffer): Check old-style backquotes after each `read'
rather than once per buffer to get more precise location info.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/bytecomp.el16
2 files changed, 11 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 560b47f1344..3e3e133bbe0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
+ * emacs-lisp/bytecomp.el (byte-compile-from-buffer): Check old-style
+ backquotes after each `read' rather than once per buffer.
+
* dframe.el: Remove spurious * in custom docstrings.
(dframe-xemacsp): Remove, use (featurep 'xemacs) instead.
(dframe-xemacs20p): Remove, inline at the sole use point.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5a7f96fb988..932d94fb368 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1821,7 +1821,6 @@ With argument, insert value in current buffer after the form."
;; new in Emacs 22.1.
(read-with-symbol-positions inbuffer)
(read-symbol-positions-list nil)
- (old-style-backquotes nil)
;; #### This is bound in b-c-close-variables.
;; (byte-compile-warnings (if (eq byte-compile-warnings t)
;; byte-compile-warning-types
@@ -1859,19 +1858,20 @@ With argument, insert value in current buffer after the form."
(not (eobp)))
(setq byte-compile-read-position (point)
byte-compile-last-position byte-compile-read-position)
- (let ((form (read inbuffer)))
+ (let* ((old-style-backquotes nil)
+ (form (read inbuffer)))
+ ;; Warn about the use of old-style backquotes.
+ (when old-style-backquotes
+ (byte-compile-warn "!! The file uses old-style backquotes !!
+This functionality has been obsolete for more than 10 years already
+and will be removed soon. See (elisp)Backquote in the manual."))
(byte-compile-file-form form)))
;; Compile pending forms at end of file.
(byte-compile-flush-pending)
;; Make warnings about unresolved functions
;; give the end of the file as their position.
(setq byte-compile-last-position (point-max))
- (byte-compile-warn-about-unresolved-functions)
- ;; Warn about the use of old-style backquotes.
- (when old-style-backquotes
- (byte-compile-warn "!! The file uses old-style backquotes !!
-This functionality has been obsolete for more than 10 years already
-and will be removed soon. See (elisp)Backquote in the manual.")))
+ (byte-compile-warn-about-unresolved-functions))
;; Fix up the header at the front of the output
;; if the buffer contains multibyte characters.
(and filename (byte-compile-fix-header filename inbuffer outbuffer))))