diff options
| author | Stefan Monnier | 2012-08-10 10:47:12 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-08-10 10:47:12 -0400 |
| commit | e18941095a56075d6eb908a65aafcd1697fea2ae (patch) | |
| tree | 8d19e753be6174e4b2195391898bca167ebdbdae /lisp/term | |
| parent | a3095f422d5a1ba89b7e5f0c3a8826cb9195fb36 (diff) | |
| download | emacs-e18941095a56075d6eb908a65aafcd1697fea2ae.tar.gz emacs-e18941095a56075d6eb908a65aafcd1697fea2ae.zip | |
* lisp/term/x-win.el (x-menu-bar-open): Always pass last-nonmenu-event.
* lisp/subr.el (eventp): `nil' is not an event, and eventp is not hot.
(event-start, event-end): Use posn-at-point to return a more
informative posn.
(posnp): New function.
* lisp/mouse.el (popup-menu-normalize-position): Use it.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/x-win.el | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 3f58614eb64..9b7254cd132 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -1306,17 +1306,14 @@ Request data types in the order specified by `x-select-request-type'." | |||
| 1306 | 1306 | ||
| 1307 | (defun x-menu-bar-open (&optional frame) | 1307 | (defun x-menu-bar-open (&optional frame) |
| 1308 | "Open the menu bar if it is shown. | 1308 | "Open the menu bar if it is shown. |
| 1309 | `popup-menu' is used if it is off " | 1309 | `popup-menu' is used if it is off." |
| 1310 | (interactive "i") | 1310 | (interactive "i") |
| 1311 | (cond | 1311 | (cond |
| 1312 | ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))) | 1312 | ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))) |
| 1313 | (fboundp 'accelerate-menu)) | 1313 | (fboundp 'accelerate-menu)) |
| 1314 | (accelerate-menu frame)) | 1314 | (accelerate-menu frame)) |
| 1315 | (t | 1315 | (t |
| 1316 | (popup-menu (mouse-menu-bar-map) | 1316 | (popup-menu (mouse-menu-bar-map) last-nonmenu-event)))) |
| 1317 | (if (listp last-nonmenu-event) | ||
| 1318 | nil | ||
| 1319 | (posn-at-point)))))) | ||
| 1320 | 1317 | ||
| 1321 | 1318 | ||
| 1322 | ;;; Window system initialization. | 1319 | ;;; Window system initialization. |