changeset 74164:a3d2bf407246

(load-with-code-conversion, with-category-table): Use with-current-buffer. (after-insert-file-set-coding): Use restore-buffer-modified-p.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 24 Nov 2006 18:43:58 +0000
parents f7736a8bd079
children dcc98f8861e9
files lisp/ChangeLog lisp/international/mule.el
diffstat 2 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 24 18:42:14 2006 +0000
+++ b/lisp/ChangeLog	Fri Nov 24 18:43:58 2006 +0000
@@ -1,10 +1,16 @@
+2006-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* international/mule.el (load-with-code-conversion)
+	(with-category-table): Use with-current-buffer.
+	(after-insert-file-set-coding): Use restore-buffer-modified-p.
+
 2006-11-24  Eli Zaretskii  <eliz@gnu.org>
 
-	* mail/smtpmail.el (smtpmail-send-it): Copy
-	buffer-file-coding-system from the mail buffer.  Possibly add a
-	MIME header for the message encoding.  Bind
-	coding-system-for-write around the call to mail-do-fcc.  Use
-	smtpmail-code-conv-from to encode queued mail messages.
+	* mail/smtpmail.el (smtpmail-send-it):
+	Copy buffer-file-coding-system from the mail buffer.  Possibly add a
+	MIME header for the message encoding.
+	Bind coding-system-for-write around the call to mail-do-fcc.
+	Use smtpmail-code-conv-from to encode queued mail messages.
 
 2006-11-24  Juanma Barranquero  <lekktu@gmail.com>
 
--- a/lisp/international/mule.el	Fri Nov 24 18:42:14 2006 +0000
+++ b/lisp/international/mule.el	Fri Nov 24 18:43:58 2006 +0000
@@ -71,8 +71,7 @@
 	  (let ((load-file-name fullname)
 		(set-auto-coding-for-load t)
 		(inhibit-file-name-operation nil))
-	    (save-excursion
-	      (set-buffer buffer)
+	    (with-current-buffer buffer
 	      ;; Don't let deactivate-mark remain set.
 	      (let (deactivate-mark)
 		(insert-file-contents fullname))
@@ -1871,7 +1870,7 @@
 		      (set-buffer-multibyte nil))
 		  (set-buffer-multibyte nil))
 		(setq inserted (- pos-marker (point)))))
-	  (set-buffer-modified-p modified-p))))
+	  (restore-buffer-modified-p modified-p))))
   inserted)
 
 ;; The coding-spec and eol-type of coding-system returned is decided
@@ -2223,8 +2222,7 @@
 	   (progn
 	     (set-category-table ,table)
 	     ,@body)
-	 (save-current-buffer
-	   (set-buffer ,old-buffer)
+	 (with-current-buffer ,old-buffer
 	   (set-category-table ,old-table))))))
 
 (defun define-translation-hash-table (symbol table)