diff options
| author | Martin Rudalics | 2018-01-27 08:29:18 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2018-01-27 08:29:18 +0100 |
| commit | d1cfe4641d89259210304cf75011a22cc765e2ed (patch) | |
| tree | d2d0ab654648b20f7b85ef5134bd91943802fe97 | |
| parent | 2ce56c51a83f6658cc6c79e4cc3716cfddbb03ff (diff) | |
| download | emacs-d1cfe4641d89259210304cf75011a22cc765e2ed.tar.gz emacs-d1cfe4641d89259210304cf75011a22cc765e2ed.zip | |
In bindings.el fix check whether mode line can be dragged
* lisp/bindings.el (mode-line-default-help-echo): Use check
whether mode line can be dragged from 'mouse-drag-mode-line'.
| -rw-r--r-- | lisp/bindings.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index 9960ba615a0..60823445b97 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -125,15 +125,18 @@ corresponding to the mode line clicked." | |||
| 125 | ;;; Mode line contents | 125 | ;;; Mode line contents |
| 126 | 126 | ||
| 127 | (defun mode-line-default-help-echo (window) | 127 | (defun mode-line-default-help-echo (window) |
| 128 | "Return default help echo text for WINDOW's mode-line." | 128 | "Return default help echo text for WINDOW's mode line." |
| 129 | (let* ((frame (window-frame window)) | 129 | (let* ((frame (window-frame window)) |
| 130 | (line-1a | 130 | (line-1a |
| 131 | ;; Show text to select window only if the window is not | 131 | ;; Show text to select window only if the window is not |
| 132 | ;; selected. | 132 | ;; selected. |
| 133 | (not (eq window (frame-selected-window frame)))) | 133 | (not (eq window (frame-selected-window frame)))) |
| 134 | (line-1b | 134 | (line-1b |
| 135 | ;; Show text to drag modeline if and only if it can be done. | 135 | ;; Show text to drag mode line if either the window is not |
| 136 | (or (window-in-direction 'below window) | 136 | ;; at the bottom of its frame or the minibuffer window of |
| 137 | ;; this frame can be resized. This matches a corresponding | ||
| 138 | ;; check in `mouse-drag-mode-line'. | ||
| 139 | (or (not (window-at-side-p window 'bottom)) | ||
| 137 | (let ((mini-window (minibuffer-window frame))) | 140 | (let ((mini-window (minibuffer-window frame))) |
| 138 | (and (eq frame (window-frame mini-window)) | 141 | (and (eq frame (window-frame mini-window)) |
| 139 | (or (minibuffer-window-active-p mini-window) | 142 | (or (minibuffer-window-active-p mini-window) |
| @@ -166,7 +169,7 @@ corresponding to the mode line clicked." | |||
| 166 | If the value is a string, it specifies the tooltip or echo area | 169 | If the value is a string, it specifies the tooltip or echo area |
| 167 | message to display when the mouse is moved over the mode line. | 170 | message to display when the mouse is moved over the mode line. |
| 168 | If the value is a function, call that function with one argument | 171 | If the value is a function, call that function with one argument |
| 169 | - the window whose mode-line to display. If the text at the | 172 | - the window whose mode line to display. If the text at the |
| 170 | mouse position has a `help-echo' text property, that overrides | 173 | mouse position has a `help-echo' text property, that overrides |
| 171 | this variable." | 174 | this variable." |
| 172 | :type '(choice | 175 | :type '(choice |