diff options
| author | Lars Ingebrigtsen | 2019-08-17 16:35:54 -0700 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-08-17 16:36:00 -0700 |
| commit | 2b9145312c4cebfd95d2d0e78ba93dbbbc9019c4 (patch) | |
| tree | 61571b9db591d482bd54d1f325dff382e093fd42 | |
| parent | 78541163c63794a80c101c0011e05e7ac65734b2 (diff) | |
| download | emacs-2b9145312c4cebfd95d2d0e78ba93dbbbc9019c4.tar.gz emacs-2b9145312c4cebfd95d2d0e78ba93dbbbc9019c4.zip | |
Issue a message on `C-x o' and there's no other window
* lisp/window.el (other-window): Issue a message when the user
types `C-x o' and there's no other window to select (bug#10999).
| -rw-r--r-- | lisp/window.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/window.el b/lisp/window.el index 2345f398e72..723671efa57 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -3926,6 +3926,7 @@ select. The argument ALL-FRAMES has the same meaning as in | |||
| 3926 | always effectively nil." | 3926 | always effectively nil." |
| 3927 | (interactive "p") | 3927 | (interactive "p") |
| 3928 | (let* ((window (selected-window)) | 3928 | (let* ((window (selected-window)) |
| 3929 | (original-window window) | ||
| 3929 | (function (and (not ignore-window-parameters) | 3930 | (function (and (not ignore-window-parameters) |
| 3930 | (window-parameter window 'other-window))) | 3931 | (window-parameter window 'other-window))) |
| 3931 | old-window old-count) | 3932 | old-window old-count) |
| @@ -3968,6 +3969,10 @@ always effectively nil." | |||
| 3968 | (t | 3969 | (t |
| 3969 | (setq count (1+ count))))) | 3970 | (setq count (1+ count))))) |
| 3970 | 3971 | ||
| 3972 | (when (and (eq window original-window) | ||
| 3973 | (called-interactively-p 'interactive)) | ||
| 3974 | (message "No other window to select")) | ||
| 3975 | |||
| 3971 | (select-window window) | 3976 | (select-window window) |
| 3972 | ;; Always return nil. | 3977 | ;; Always return nil. |
| 3973 | nil)))) | 3978 | nil)))) |