aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-02-24 21:26:05 +0000
committerRichard M. Stallman1995-02-24 21:26:05 +0000
commit1cc9a99ec39b2af6bdb6b0cddef798e83e650842 (patch)
tree83bfd59fa499aace09ca3da782d0ff1f19a71c61
parent376b0e59540adfb3a56368046b5c8cfdff7cd76b (diff)
downloademacs-1cc9a99ec39b2af6bdb6b0cddef798e83e650842.tar.gz
emacs-1cc9a99ec39b2af6bdb6b0cddef798e83e650842.zip
(mouse-select-buffer): Do sit-for before x-popup-menu.
-rw-r--r--lisp/msb.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/msb.el b/lisp/msb.el
index a28ede10d84..1d7657b3e47 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -28,10 +28,14 @@
28;; 2. Make a better mouse-buffer-menu. 28;; 2. Make a better mouse-buffer-menu.
29;; 29;;
30;; Installation: 30;; Installation:
31;; (require 'msb) 31
32;; Note! You now use msb instead of mouse-buffer-menu. 32;; 1. Byte compile msb first. It uses things in the cl package that
33;; 33;; are slow if not compiled, but blazingly fast when compiled. I
34;; Now try the menu bar Buffers menu. 34;; have also had one report that said that msb malfunctioned when
35;; not compiled.
36;; 2. (require 'msb)
37;; Note! You now use msb instead of mouse-buffer-menu.
38;; 3. Now try the menu bar Buffers menu.
35;; 39;;
36;; Customization: 40;; Customization:
37;; Look at the variable `msb-menu-cond' for deciding what menus you 41;; Look at the variable `msb-menu-cond' for deciding what menus you
@@ -835,6 +839,10 @@ variable `msb-menu-cond'."
835 ;; adjust position 839 ;; adjust position
836 (setq posX (- posX (funcall msb-horizontal-shift-function)) 840 (setq posX (- posX (funcall msb-horizontal-shift-function))
837 position (list (list posX posY) posWind)))) 841 position (list (list posX posY) posWind))))
842 ;; This `sit-for' magically makes the menu stay up if the mouse
843 ;; button is released withing 0.1 second.
844 (sit-for 0 100)
845 ;; Popup the menu
838 (setq choice (x-popup-menu position msb--last-buffer-menu)) 846 (setq choice (x-popup-menu position msb--last-buffer-menu))
839 (cond 847 (cond
840 ((eq (car choice) 'toggle) 848 ((eq (car choice) 'toggle)