Function: trashed-mouse-popup-menu
trashed-mouse-popup-menu is an interactive and natively compiled
function defined in trashed.el.
Signature
(trashed-mouse-popup-menu EVENT)
Documentation
Popup menu for the file you click on.
EVENT is the mouse click event.
Key Bindings
trashed-mode-map <mouse-3>
Source Code
;; Defined in /nix/store/7ppdacjhnynz276lxxnfw8sdz6r2k6h2-emacs-packages-deps/share/emacs/site-lisp/elpa/trashed-20230811.157/trashed.el
(defun trashed-mouse-popup-menu (event)
"Popup menu for the file you click on.
EVENT is the mouse click event."
(interactive "e")
(let ((inhibit-read-only t)
sp ep key cmd)
(pop-to-buffer (window-buffer (posn-window (event-end event))))
(goto-char (posn-point (event-end event)))
;; Highlight the file while menu is shown
(save-excursion (setq sp (progn (trashed-set-hpos 3) (point))
ep (progn (end-of-line) (point))))
(put-text-property sp ep 'font-lock-face 'highlight)
(redisplay)
(if (not (eq (setq key (apply 'vector (x-popup-menu event trashed-menu)))
[]))
(setq cmd (lookup-key trashed-menu key)))
(remove-text-properties sp ep '(font-lock-face))
(if cmd (call-interactively cmd))))