changeset 93234:3f711cd30ffa

(mode-line-change-eol): Use with-selected-window.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 26 Mar 2008 03:32:46 +0000
parents f86b9c0c87ee
children 4525730eae72
files lisp/ChangeLog lisp/bindings.el
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 26 03:31:42 2008 +0000
+++ b/lisp/ChangeLog	Wed Mar 26 03:32:46 2008 +0000
@@ -1,5 +1,7 @@
 2008-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* bindings.el (mode-line-change-eol): Use with-selected-window.
+
 	* apropos.el (apropos-command): Include macros.
 
 2008-03-26  Glenn Morris  <rgm@gnu.org>
--- a/lisp/bindings.el	Wed Mar 26 03:31:42 2008 +0000
+++ b/lisp/bindings.el	Wed Mar 26 03:32:46 2008 +0000
@@ -138,8 +138,7 @@
 (defun mode-line-change-eol (event)
   "Cycle through the various possible kinds of end-of-line styles."
   (interactive "e")
-  (save-selected-window
-    (select-window (posn-window (event-start event)))
+  (with-selected-window (posn-window (event-start event))
     (let ((eol (coding-system-eol-type buffer-file-coding-system)))
       (set-buffer-file-coding-system
        (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix))))))