* Keybinding emacs debug function
@ 2021-04-22 13:38 steve-humphreys
2021-04-22 17:58 ` Good checks for "debug-on-message" steve-humphreys
0 siblings, 1 reply; 2+ messages in thread
From: steve-humphreys @ 2021-04-22 13:38 UTC (permalink / raw)
To: Help Gnu Emacs
Have written an emacs debug function with emacs complaining when I try
to set "H-g".
Regards
(defun cycle-debug (n)
"Enables the Emacs Debugger."
(pcase n
(1 (setq debug-on-error t) ) ; calls debugger on signalled errors
(2 (setq debug-on-error t)
(setq debug-ignored-errors t) )
(3 (setq debug-on-error t) ; case that debugs all errors
(setq debug-ignored-errors t)
(setq debug-on-message "unescaped character literals") )
(_ (setq debug-on-error nil) )))
(defun emacs-debug ()
"Debugging gungadin"
(cycle-debug)
(global-set-key (kbd "H-g") #'cycle-debug) )
^ permalink raw reply [flat|nested] 2+ messages in thread
* Good checks for "debug-on-message"
2021-04-22 13:38 Keybinding emacs debug function steve-humphreys
@ 2021-04-22 17:58 ` steve-humphreys
0 siblings, 0 replies; 2+ messages in thread
From: steve-humphreys @ 2021-04-22 17:58 UTC (permalink / raw)
To: Help Gnu Emacs
what would be good checks for "debug-on-message"?
> (defun cycle-debug (n)
> "Enables the Emacs Debugger."
>
> (pcase n
> (1 (setq debug-on-error t) ) ; calls debugger on signalled errors
> (2 (setq debug-on-error t)
> (setq debug-ignored-errors t) )
> (3 (setq debug-on-error t) ; case that debugs all errors
> (setq debug-ignored-errors t)
> (setq debug-on-message "unescaped character literals") )
> (_ (setq debug-on-error nil) )))
>
> (defun emacs-debug ()
> "Sets debugging capability"
> (cycle-debug)
> (global-set-key (kbd "H-g") #'cycle-debug) )
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-22 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22 13:38 Keybinding emacs debug function steve-humphreys
2021-04-22 17:58 ` Good checks for "debug-on-message" steve-humphreys
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).