[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatically checking parentheses before a global save not working
From: |
Elena |
Subject: |
Re: Automatically checking parentheses before a global save not working. |
Date: |
Wed, 08 Dec 2010 15:16:53 -0000 |
User-agent: |
G2/1.0 |
On 1 Lug, 18:16, Andreas Politz <poli...@fh-trier.de> wrote:
> > (switch-to-buffer (buffer-name))
>
> There is no user interaction at this point.
What do you mean, please? Can't I call `switch-to-buffer' there?
However, `yes-or-no-p' (which interacts with the user) works, and the
buffer to fix is being correctly identified by name.
> You could try something
> with `recursive-edit', but I don't know if it is a good idea to change
> the buffer state at this point (in the `before-save-hook').
If I can't switch buffer right away, maybe an alternative and safe
approach would be to set a delayed switch, which would run after
termination of `condition-case'.
>
> Also, I suppose running the hook is wrapped in some
> current-buffer-saving-macro.
Yes, this function has been locally added to `before-save-hook' into
`emacs-lisp-mode'.
Thanks for you help.