emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v
Date: Mon, 27 Aug 2007 04:00:35 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/08/27 04:00:20

Index: lisp/emacs-lisp/bytecomp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.206
retrieving revision 2.207
diff -u -b -r2.206 -r2.207
--- lisp/emacs-lisp/bytecomp.el 23 Aug 2007 19:58:31 -0000      2.206
+++ lisp/emacs-lisp/bytecomp.el 27 Aug 2007 04:00:15 -0000      2.207
@@ -1010,8 +1010,7 @@
 (defun byte-compile-log-file ()
   (and (not (equal byte-compile-current-file byte-compile-last-logged-file))
        (not noninteractive)
-       (save-excursion
-        (set-buffer (get-buffer-create "*Compile-Log*"))
+       (with-current-buffer (get-buffer-create "*Compile-Log*")
         (goto-char (point-max))
         (let* ((inhibit-read-only t)
                (dir (and byte-compile-current-file
@@ -1548,8 +1547,7 @@
       nil
     (save-some-buffers)
     (force-mode-line-update))
-  (save-current-buffer
-    (set-buffer (get-buffer-create "*Compile-Log*"))
+  (with-current-buffer (get-buffer-create "*Compile-Log*")
     (setq default-directory (expand-file-name directory))
     ;; compilation-mode copies value of default-directory.
     (unless (eq major-mode 'compilation-mode)
@@ -1651,7 +1649,7 @@
       (let ((b (get-file-buffer (expand-file-name filename))))
        (if (and b (buffer-modified-p b)
                 (y-or-n-p (format "Save buffer %s first? " (buffer-name b))))
-           (save-excursion (set-buffer b) (save-buffer)))))
+           (with-current-buffer b (save-buffer)))))
 
   ;; Force logging of the file name for each file compiled.
   (setq byte-compile-last-logged-file nil)
@@ -1661,9 +1659,8 @@
        byte-compile-dest-file)
     (setq target-file (byte-compile-dest-file filename))
     (setq byte-compile-dest-file target-file)
-    (save-excursion
+    (with-current-buffer 
       (setq input-buffer (get-buffer-create " *Compiler Input*"))
-      (set-buffer input-buffer)
       (erase-buffer)
       (setq buffer-file-coding-system nil)
       ;; Always compile an Emacs Lisp file as multibyte
@@ -1864,7 +1861,13 @@
                 (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]