[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el, v [EMACS_22_
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el, v [EMACS_22_BASE] |
Date: |
Wed, 22 Aug 2007 15:51:17 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Stefan Monnier <monnier> 07/08/22 15:51:16
Index: emacs-lisp/bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.198.2.2
retrieving revision 2.198.2.3
diff -u -b -r2.198.2.2 -r2.198.2.3
--- emacs-lisp/bytecomp.el 25 Jul 2007 04:09:48 -0000 2.198.2.2
+++ emacs-lisp/bytecomp.el 22 Aug 2007 15:51:12 -0000 2.198.2.3
@@ -1008,8 +1008,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
@@ -1545,8 +1544,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)
@@ -1648,7 +1646,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)
@@ -1658,9 +1656,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
@@ -1830,9 +1827,8 @@
;; byte-compile-warnings))
)
(byte-compile-close-variables
- (save-excursion
- (setq outbuffer
- (set-buffer (get-buffer-create " *Compiler Output*")))
+ (with-current-buffer
+ (setq outbuffer (get-buffer-create " *Compiler Output*"))
(set-buffer-multibyte t)
(erase-buffer)
;; (emacs-lisp-mode)
@@ -1846,8 +1842,7 @@
(setq overwrite-mode 'overwrite-mode-binary))
(displaying-byte-compile-warnings
(and filename (byte-compile-insert-header filename inbuffer outbuffer))
- (save-excursion
- (set-buffer inbuffer)
+ (with-current-buffer inbuffer
(goto-char 1)
;; Should we always do this? When calling multiple files, it
;; would be useful to delay this warning until all have been
@@ -2036,6 +2031,7 @@
;; We need to examine byte-compile-dynamic-docstrings
;; in the input buffer (now current), not in the output buffer.
(let ((dynamic-docstrings byte-compile-dynamic-docstrings))
+ ;; FIXME: What's up with those set-buffers&prog1 thingy? --Stef
(set-buffer
(prog1 (current-buffer)
(set-buffer outbuffer)
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el, v [EMACS_22_BASE],
Stefan Monnier <=