1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

(mode-line-change-eol): Use with-selected-window.

This commit is contained in:
Stefan Monnier 2008-03-26 03:32:46 +00:00
parent 554fde6ed7
commit 0ec08b3800
2 changed files with 3 additions and 2 deletions

View 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>

View 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))))))