Commit 4f484c94 authored by David Kågedal's avatar David Kågedal
Browse files

No commit message

No commit message
parent a6290a12
Tue Oct 8 04:44:29 1996 David Kgedal <davidk@lysator.liu.se>
* menus.el (lyskom-background-menu): Ny funktion.
Tue Oct 8 03:55:40 1996 David Kgedal <kg@infovav.se>
* lyskom-buttons.el (lyskom-make-button-menu): Ny funktion.
(lyskom-mouse-3): Anvnd en keymap som meny.
(lyskom-button-menu): Bytte namn frn lyskom-mouse-3.
Tue Oct 8 02:10:10 1996 Niels Mller <nisse@lysator.liu.se>
......
......@@ -111,9 +111,11 @@ on such functions see the documentation for lyskom-add-button-action."
(defun kom-mouse-3 (event)
"Pop up a menu of actions to be taken at the active area under the mouse."
(interactive "@e")
(let ((start (event-start event)))
(lyskom-mouse-3 (car (cdr start)) event)))
(let ((pos (posn-point (event-start event))))
(if (get-text-property pos 'lyskom-button-type)
(lyskom-button-menu pos event)
(lyskom-background-menu pos event))))
(defun kom-mouse-null (event)
"Do nothing."
;; This is here to pervent unwanted events when clicking mouse-3
......@@ -123,12 +125,11 @@ on such functions see the documentation for lyskom-add-button-action."
"Create a menu keymap from a list of button actions."
;; Use the command as the event for simplicity.
(append (list 'keymap title)
(mapcar '(lambda (entry) (cons (cdr (cdr entry)) entry))
(mapcar '(lambda (entry) (cons (cdr entry) entry))
entries)))
(defun lyskom-mouse-3 (pos event)
(defun lyskom-button-menu (pos event)
"Internal function used by kom-mouse-3"
(setq last-command-event nil)
(let* ((type (get-text-property pos 'lyskom-button-type))
(arg (get-text-property pos 'lyskom-button-arg))
(text (get-text-property pos 'lyskom-button-text))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment