]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't signal error from "C-x C-k l" about mouse events
authorDrew Adams <drew.adams@oracle.com>
Sun, 30 Dec 2018 19:37:28 +0000 (11:37 -0800)
committerEli Zaretskii <eliz@gnu.org>
Sat, 5 Jan 2019 09:36:16 +0000 (11:36 +0200)
* lisp/edmacro.el (edmacro-fix-menu-commands): Ignore mouse
events instead of signaling an error.  Display unsupported
events in the error message.  (Bug#33930)

lisp/edmacro.el

index 55023462ad970e053fb3b2f9313bc4f52abf4299..b480b2330a82fff60036906824273c2e2c37434d 100644 (file)
@@ -623,12 +623,16 @@ This function assumes that the events can be stored in a string."
                 (push (vector 'menu-bar (car ev)) result))
                ;; It would be nice to do pop-up menus, too, but not enough
                ;; info is recorded in macros to make this possible.
-               (noerror
-                ;; Just ignore mouse events.
+               ((or (mouse-event-p ev) (mouse-movement-p ev)
+                    (memq (event-basic-type ev)
+                          (list mouse-wheel-down-event mouse-wheel-up-event
+                                mouse-wheel-right-event
+                                mouse-wheel-left-event)))
                 nil)
+               (noerror nil)
                (t
-                (error "Macros with mouse clicks are not %s"
-                       "supported by this command"))))
+                (error "`edmacro-fix-menu-commands': Unsupported event: %S"
+                       ev))))
        ;; Reverse them again and make them back into a vector.
        (vconcat (nreverse result)))
     macro))