[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/prop-menu 2b0de81 5/9: Get properties from correct window
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/prop-menu 2b0de81 5/9: Get properties from correct window on click |
Date: |
Sun, 29 Aug 2021 11:29:15 -0400 (EDT) |
branch: elpa/prop-menu
commit 2b0de81cdebab563a053026056b558bebfd98bce
Author: David Raymond Christiansen <david@davidchristiansen.dk>
Commit: David Raymond Christiansen <david@davidchristiansen.dk>
Get properties from correct window on click
Now, text properties for the mouse menu are computed for the correct
window when clicking. Previously, the mouse menu only worked when the
clicked window was already focused.
---
prop-menu.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/prop-menu.el b/prop-menu.el
index 69b88a4..bb92a2e 100644
--- a/prop-menu.el
+++ b/prop-menu.el
@@ -5,7 +5,7 @@
;; Author: David Christiansen <david@davidchristiansen.dk>
;; URL: https://github.com/david-christiansen/prop-menu-el
;; Package-Requires: ((emacs "24") (cl-lib "0.5"))
-;; Version: 0.1
+;; Version: 0.1.1
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
@@ -95,10 +95,13 @@ When called interactively, WHERE defaults to point."
When calling `prop-menu-item-functions', point is at the clicked
location."
(interactive "e")
- (let* ((where (posn-point (event-end click)))
- (menu-items (save-excursion
- (goto-char where)
- (prop-menu--items-for-location where))))
+ (let* ((window (posn-window (event-end click)))
+ (buffer (window-buffer window))
+ (where (posn-point (event-end click)))
+ (menu-items (with-current-buffer buffer
+ (save-excursion
+ (goto-char where)
+ (prop-menu--items-for-location where)))))
(when menu-items
(let* ((menu (make-sparse-keymap))
(todo (cl-loop for (str action) in menu-items
- [nongnu] branch elpa/prop-menu created (now 50b102c), ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 01ae5d4 1/9: Initial commit, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 67db928 2/9: Increase the range of compatible Emacsen, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 0b38577 6/9: Initial Travis setup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 65df241 3/9: Remove stale testing code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 632ac43 4/9: Execute property-getting functions with point at click location, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 97a0ab1 7/9: Make Emacs 24.3 happy, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 2b0de81 5/9: Get properties from correct window on click,
ELPA Syncer <=
- [nongnu] elpa/prop-menu 50b102c 9/9: Merge pull request #2 from david-christiansen/travis, ELPA Syncer, 2021/08/29
- [nongnu] elpa/prop-menu 1edda80 8/9: Version bump, ELPA Syncer, 2021/08/29