[Top][All Lists]

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

bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-comman

From: Eli Zaretskii
Subject: bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook).
Date: Wed, 30 Dec 2015 20:04:56 +0200

> From: address@hidden
> Date: Wed, 30 Dec 2015 08:28:04 +0100
> This report is about a possible improvement. The "bug" arises only after
> a programming mistake.
> Please find attached a recipe to reproduce a stupid thing I've done.
> I was trying to define a new global minor mode. I ended up placing a
> function that raises an unhandled error in `post-command-hook'.
> Then, I had to kill my Emacs; I found no other way to recover control.
> As the `post-command-hook' documentation says, Emacs could probably
> do better here by discarding my non-working code.
> To reproduce and *KILL YOUR EMACS*, launch a *NEW* Emacs like that:
>    emacs -Q --load test-kill-your-emacs-with-global-mode.el A-NEW-FILE.txt 
> --eval '(insert "modified")' --funcall BAD-global-mode 
> I'm reporting this only to improve Emacs. I obviously fixed my code and
> Emacs is awesome again!


The current ELisp manual says:

     Quitting is suppressed while running `pre-command-hook' and
  `post-command-hook'.  If an error happens while executing one of these
  hooks, it does not terminate execution of the hook; instead the error
  is silenced and the function in which the error occurred is removed
  from the hook.

Are you saying that this is inaccurate, and what actually happens is
something else?

reply via email to

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