]> git.eshelyaron.com Git - emacs.git/commitdiff
(mode-line-change-eol): Use with-selected-window.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Mar 2008 03:32:46 +0000 (03:32 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Mar 2008 03:32:46 +0000 (03:32 +0000)
lisp/ChangeLog
lisp/bindings.el

index b97c37f1f9b1821f7efd3aa6ad7aba518c649db6..97e59b46f2522464c4a10206cc8a2381de80e955 100644 (file)
@@ -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>
index b2f051cf030eb939ef024b258a06114f3625b2ec..7e24013b699d5a0707068c5e0fbc4b63c564a6bb 100644 (file)
@@ -138,8 +138,7 @@ corresponding to the mode line clicked."
 (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))))))