diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 28 | ||||
| -rw-r--r-- | lisp/mouse.el | 17 |
3 files changed, 38 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b2a1751813..2ec54b36d1d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * minibuffer.el (minibuffer-inactive-mode-map): New var. | ||
| 4 | (minibuffer-inactive-mode): New major mode. | ||
| 5 | * mouse.el (mouse-drag-region): Remove the "mouse-1 pops up | ||
| 6 | the *Messages* buffer" hack. | ||
| 7 | (mouse-popup-menubar): Don't burp if the event is a normal key. | ||
| 8 | |||
| 3 | Miscellaneous tweaks. | 9 | Miscellaneous tweaks. |
| 4 | * emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for | 10 | * emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for |
| 5 | lexical scoping as in subr.el's dolist and dotimes. | 11 | lexical scoping as in subr.el's dolist and dotimes. |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 972c65f62e3..3699f5bab02 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1657,6 +1657,34 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1657 | (define-key map "\t" 'exit-minibuffer) | 1657 | (define-key map "\t" 'exit-minibuffer) |
| 1658 | (define-key map "?" 'self-insert-and-exit)) | 1658 | (define-key map "?" 'self-insert-and-exit)) |
| 1659 | 1659 | ||
| 1660 | (defvar minibuffer-inactive-mode-map | ||
| 1661 | (let ((map (make-keymap))) | ||
| 1662 | (suppress-keymap map) | ||
| 1663 | (define-key map "e" 'find-file-other-frame) | ||
| 1664 | (define-key map "f" 'find-file-other-frame) | ||
| 1665 | (define-key map "b" 'switch-to-buffer-other-frame) | ||
| 1666 | (define-key map "i" 'info) | ||
| 1667 | (define-key map "m" 'mail) | ||
| 1668 | (define-key map "n" 'make-frame) | ||
| 1669 | (define-key map [mouse-1] (lambda () (interactive) | ||
| 1670 | (with-current-buffer "*Messages*" | ||
| 1671 | (goto-char (point-max)) | ||
| 1672 | (display-buffer (current-buffer))))) | ||
| 1673 | ;; So the global down-mouse-1 binding doesn't clutter the execution of the | ||
| 1674 | ;; above mouse-1 binding. | ||
| 1675 | (define-key map [down-mouse-1] #'ignore) | ||
| 1676 | map) | ||
| 1677 | "Keymap for use in the minibuffer when it is not active. | ||
| 1678 | The non-mouse bindings in this keymap can only be used in minibuffer-only | ||
| 1679 | frames, since the minibuffer can normally not be selected when it is | ||
| 1680 | not active.") | ||
| 1681 | |||
| 1682 | (define-derived-mode minibuffer-inactive-mode nil "InactiveMinibuffer" | ||
| 1683 | :abbrev-table nil ;abbrev.el is not loaded yet during dump. | ||
| 1684 | ;; Note: this major mode is called from minibuf.c. | ||
| 1685 | "Major mode to use in the minibuffer when it is not active. | ||
| 1686 | This is only used when the minibuffer area has no active minibuffer.") | ||
| 1687 | |||
| 1660 | ;;; Completion tables. | 1688 | ;;; Completion tables. |
| 1661 | 1689 | ||
| 1662 | (defun minibuffer--double-dollars (str) | 1690 | (defun minibuffer--double-dollars (str) |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 124f84d7d73..f35069763bd 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -278,7 +278,7 @@ The contents are the items that would be in the menu bar whether or | |||
| 278 | not it is actually displayed." | 278 | not it is actually displayed." |
| 279 | (interactive "@e \nP") | 279 | (interactive "@e \nP") |
| 280 | (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) | 280 | (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) |
| 281 | (popup-menu (mouse-menu-bar-map) event prefix)) | 281 | (popup-menu (mouse-menu-bar-map) (unless (integerp event) event) prefix)) |
| 282 | (make-obsolete 'mouse-popup-menubar 'mouse-menu-bar-map "23.1") | 282 | (make-obsolete 'mouse-popup-menubar 'mouse-menu-bar-map "23.1") |
| 283 | 283 | ||
| 284 | (defun mouse-popup-menubar-stuff (event prefix) | 284 | (defun mouse-popup-menubar-stuff (event prefix) |
| @@ -790,18 +790,9 @@ remains active. Otherwise, it remains until the next input event. | |||
| 790 | 790 | ||
| 791 | If the click is in the echo area, display the `*Messages*' buffer." | 791 | If the click is in the echo area, display the `*Messages*' buffer." |
| 792 | (interactive "e") | 792 | (interactive "e") |
| 793 | (let ((w (posn-window (event-start start-event)))) | 793 | ;; Give temporary modes such as isearch a chance to turn off. |
| 794 | (if (and (window-minibuffer-p w) | 794 | (run-hooks 'mouse-leave-buffer-hook) |
| 795 | (not (minibuffer-window-active-p w))) | 795 | (mouse-drag-track start-event t)) |
| 796 | (save-excursion | ||
| 797 | ;; Swallow the up-event. | ||
| 798 | (read-event) | ||
| 799 | (set-buffer (get-buffer-create "*Messages*")) | ||
| 800 | (goto-char (point-max)) | ||
| 801 | (display-buffer (current-buffer))) | ||
| 802 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 803 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 804 | (mouse-drag-track start-event t)))) | ||
| 805 | 796 | ||
| 806 | 797 | ||
| 807 | (defun mouse-posn-property (pos property) | 798 | (defun mouse-posn-property (pos property) |