diff options
| author | Stefan Monnier | 2008-03-26 03:32:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-26 03:32:46 +0000 |
| commit | 0ec08b38001ff9e3f8ec59133a70b217330a3763 (patch) | |
| tree | db9d4d26d170f650c581eea9a3189cd31fd97d3a | |
| parent | 554fde6ed7a93c11c587eb58679b23f93df4b8ca (diff) | |
| download | emacs-0ec08b38001ff9e3f8ec59133a70b217330a3763.tar.gz emacs-0ec08b38001ff9e3f8ec59133a70b217330a3763.zip | |
(mode-line-change-eol): Use with-selected-window.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/bindings.el | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b97c37f1f9b..97e59b46f25 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2008-03-26 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-03-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * bindings.el (mode-line-change-eol): Use with-selected-window. | ||
| 4 | |||
| 3 | * apropos.el (apropos-command): Include macros. | 5 | * apropos.el (apropos-command): Include macros. |
| 4 | 6 | ||
| 5 | 2008-03-26 Glenn Morris <rgm@gnu.org> | 7 | 2008-03-26 Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/bindings.el b/lisp/bindings.el index b2f051cf030..7e24013b699 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -138,8 +138,7 @@ corresponding to the mode line clicked." | |||
| 138 | (defun mode-line-change-eol (event) | 138 | (defun mode-line-change-eol (event) |
| 139 | "Cycle through the various possible kinds of end-of-line styles." | 139 | "Cycle through the various possible kinds of end-of-line styles." |
| 140 | (interactive "e") | 140 | (interactive "e") |
| 141 | (save-selected-window | 141 | (with-selected-window (posn-window (event-start event)) |
| 142 | (select-window (posn-window (event-start event))) | ||
| 143 | (let ((eol (coding-system-eol-type buffer-file-coding-system))) | 142 | (let ((eol (coding-system-eol-type buffer-file-coding-system))) |
| 144 | (set-buffer-file-coding-system | 143 | (set-buffer-file-coding-system |
| 145 | (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix)))))) | 144 | (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix)))))) |