summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-07 20:32:35 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-07 20:32:35 +0000
commitae1b301f1082918868de296be6f3ac4790aeed9f (patch)
tree123f1d7bf6c87f56a4f826ae1e51cd284faec318
parent02fc092780f71216abfd76373ada0a55676e57e1 (diff)
downloademacs-ae1b301f1082918868de296be6f3ac4790aeed9f.tar.gz
(mouse-major-mode-menu): Propagate prefix arg
to the command that is run.
-rw-r--r--lisp/mouse.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0981533d038..c96a2aaca54 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -42,11 +42,11 @@
;; Provide a mode-specific menu on a mouse button.
-(defun mouse-major-mode-menu (event)
+(defun mouse-major-mode-menu (event prefix)
"Pop up a mode-specific menu of mouse commands."
;; Switch to the window clicked on, because otherwise
;; the mode's commands may not make sense.
- (interactive "@e")
+ (interactive "@e\nP")
(let (;; This is where mouse-major-mode-menu-prefix
;; returns the prefix we should use (after menu-bar).
;; It is either nil or (SOME-SYMBOL).
@@ -66,8 +66,12 @@
(apply 'vector (append '(menu-bar)
mouse-major-mode-menu-prefix
result)))))
+ ;; Clear out echoing, which perhaps shows a prefix arg.
+ (message "")
(if command
- (command-execute command))))))
+ (progn
+ (setq prefix-arg prefix)
+ (command-execute command)))))))
;; Compute and cache the equivalent keys in MENU and all its submenus.
;;;(defun mouse-major-mode-menu-compute-equiv-keys (menu)