* lisp/jit-lock.el (jit-lock-debug-mode): New minor mode.

(jit-lock--debug-fontifying): New var.
(jit-lock--debug-fontify): New function.
* lisp/subr.el (condition-case-unless-debug): Don't prevent catching the
error, just let the debbugger run.
* lisp/emacs-lisp/timer.el (timer-event-handler): Don't prevent debugging
timer code and don't drop errors silently.
This commit is contained in:
Stefan Monnier 2013-01-12 20:23:48 -05:00
parent 5ca9b80e95
commit e5b5a34dd1
5 changed files with 67 additions and 12 deletions

View file

@ -307,13 +307,13 @@ This function is called, by name, directly by the C code."
;; Run handler.
;; We do this after rescheduling so that the handler function
;; can cancel its own timer successfully with cancel-timer.
(condition-case nil
(condition-case-unless-debug err
;; Timer functions should not change the current buffer.
;; If they do, all kinds of nasty surprises can happen,
;; and it can be hellish to track down their source.
(save-current-buffer
(apply (timer--function timer) (timer--args timer)))
(error nil))
(error (message "Error in timer: %S" err)))
(if retrigger
(setf (timer--triggered timer) nil)))
(error "Bogus timer event"))))