]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-major-mode-menu): Propagate prefix arg
authorRichard M. Stallman <rms@gnu.org>
Sat, 7 Dec 1996 20:32:35 +0000 (20:32 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 7 Dec 1996 20:32:35 +0000 (20:32 +0000)
to the command that is run.

lisp/mouse.el

index 0981533d038c28c78439b2640b208dda496e4e26..c96a2aaca543506aedffdc2e3685f6f5d05e199f 100644 (file)
 \f
 ;; 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).
                        (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)