aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew Adams2018-12-30 11:37:28 -0800
committerEli Zaretskii2019-01-05 11:36:16 +0200
commit821a0840b27861e7323c192848a21def2aeddca0 (patch)
tree76d39b687f2dfd0b85dd2db80ddc14c03a06602e
parenta3c79d44ccb4f6503d0a8b02230ff7a41db64ff8 (diff)
downloademacs-821a0840b27861e7323c192848a21def2aeddca0.tar.gz
emacs-821a0840b27861e7323c192848a21def2aeddca0.zip
Don't signal error from "C-x C-k l" about mouse events
* lisp/edmacro.el (edmacro-fix-menu-commands): Ignore mouse events instead of signaling an error. Display unsupported events in the error message. (Bug#33930)
-rw-r--r--lisp/edmacro.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 55023462ad9..b480b2330a8 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -623,12 +623,16 @@ This function assumes that the events can be stored in a string."
623 (push (vector 'menu-bar (car ev)) result)) 623 (push (vector 'menu-bar (car ev)) result))
624 ;; It would be nice to do pop-up menus, too, but not enough 624 ;; It would be nice to do pop-up menus, too, but not enough
625 ;; info is recorded in macros to make this possible. 625 ;; info is recorded in macros to make this possible.
626 (noerror 626 ((or (mouse-event-p ev) (mouse-movement-p ev)
627 ;; Just ignore mouse events. 627 (memq (event-basic-type ev)
628 (list mouse-wheel-down-event mouse-wheel-up-event
629 mouse-wheel-right-event
630 mouse-wheel-left-event)))
628 nil) 631 nil)
632 (noerror nil)
629 (t 633 (t
630 (error "Macros with mouse clicks are not %s" 634 (error "`edmacro-fix-menu-commands': Unsupported event: %S"
631 "supported by this command")))) 635 ev))))
632 ;; Reverse them again and make them back into a vector. 636 ;; Reverse them again and make them back into a vector.
633 (vconcat (nreverse result))) 637 (vconcat (nreverse result)))
634 macro)) 638 macro))