From: Stefan Monnier Date: Fri, 24 Nov 2006 18:43:58 +0000 (+0000) Subject: (load-with-code-conversion, with-category-table): Use with-current-buffer. X-Git-Tag: emacs-pretest-22.0.92~530 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=053f45dd627fbbf0735029272cb77e2e1f44ed0b;p=emacs.git (load-with-code-conversion, with-category-table): Use with-current-buffer. (after-insert-file-set-coding): Use restore-buffer-modified-p. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3e84443940..1ed2f1bea43 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,10 +1,16 @@ +2006-11-24 Stefan Monnier + + * 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 - * 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 diff --git a/lisp/international/mule.el b/lisp/international/mule.el index fe01f0b7e9c..468b8678da4 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -71,8 +71,7 @@ Return t if file exists." (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 @@ The optional second arg VISIT non-nil means that we are visiting a file." (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 @@ Value is what BODY returns." (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)