aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorMasatake YAMATO2012-07-20 07:32:30 -0400
committerStefan Monnier2012-07-20 07:32:30 -0400
commitbbf0e7d97893b9abfe6575a408f03e48543cb513 (patch)
tree4c902d028a64bffea758f2c5e78817a1f853549c /lisp/term
parentc28662a8dc4fefae711b21fcb7a71e871e37d1e6 (diff)
downloademacs-bbf0e7d97893b9abfe6575a408f03e48543cb513.tar.gz
emacs-bbf0e7d97893b9abfe6575a408f03e48543cb513.zip
* lisp/term/x-win.el (x-menu-bar-open): Use `frame-parameter'
to check whether menu-bar is shown or not. If not shown, show the menu-bar as a popup menu instead of using tmm. * lisp/mouse.el (popup-menu): Accept `point' as `position' argument.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/x-win.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 498cc01fe22..fb7389b856c 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1305,12 +1305,18 @@ Request data types in the order specified by `x-select-request-type'."
1305(declare-function accelerate-menu "xmenu.c" (&optional frame) t) 1305(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
1306 1306
1307(defun x-menu-bar-open (&optional frame) 1307(defun x-menu-bar-open (&optional frame)
1308 "Open the menu bar if `menu-bar-mode' is on, otherwise call `tmm-menubar'." 1308 "Open the menu bar if it is shown.
1309`popup-menu' is used if it is off "
1309 (interactive "i") 1310 (interactive "i")
1310 (if (and menu-bar-mode 1311 (cond
1311 (fboundp 'accelerate-menu)) 1312 ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0)))
1312 (accelerate-menu frame) 1313 (fboundp 'accelerate-menu))
1313 (tmm-menubar))) 1314 (accelerate-menu frame))
1315 (t
1316 (popup-menu (mouse-menu-bar-map)
1317 (if (listp last-nonmenu-event)
1318 nil
1319 'point)))))
1314 1320
1315 1321
1316;;; Window system initialization. 1322;;; Window system initialization.