help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What function does a button click call?


From: Michael Heerdegen
Subject: Re: What function does a button click call?
Date: Sun, 26 Oct 2014 20:19:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Try M-x debug-on-entry widget-button-click RET to find out what
> happens when pressing the button.

BTW, a good strategy to find out what happens after hitting some key is
to use C-c k to see which command will be invoked, and then to M-x
debug-on-entry this command.  I do that so often that I wrote an own
command doing that, and bound it to a simple key:

(defun my-debug-on-next-key ()
  "Enter the debugger for the next command."
  (interactive)
  (let* ((keys (read-key-sequence "Debugging next key sequence..."))
         (cmd (key-binding keys)))
    (debug-on-entry cmd)
    (unwind-protect
         (call-interactively cmd keys)
      (cancel-debug-on-entry cmd))))


Regards,

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]