[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: position on changing defaults?
From: |
Kim F. Storm |
Subject: |
Re: position on changing defaults? |
Date: |
Sat, 08 Mar 2008 21:56:01 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> BTW, why is using a pre- or post- command hook so bad?
>
> These tend to be brittle (e.g. when entering/exiting minibuffer prompts
> or recursive edits) and difficult to debug. I think the need for
> pre/post command-hook is often a sign of a missing
> functionality elsewhere.
It seems I could get by with the following hooks:
pre-command-shifted-key-hook
Called before executing command if transient-mark-mode
is enabled and current command is invoked by a shifted key.
pre-command-mark-active-hook
Called before executing command if transient-mark-mode
is enabled and mark is active.
post-command-mark-active-hook
Called after executing command if transient-mark-mode
is enabled and mark is active. Called before checking
value of deactivate-mark!
I can probably do without the two mark-active hooks if it is
ok to use activate-mark-hook and deactivate-mark-hook to
add and remove functions on the general pre-command-hook
and post-command-hook, but having dedicated hooks would
be easier.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- RE: CUA mode's C-RET binding [was: position on changing defaults?], (continued)
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/13
- Re: position on changing defaults?, Richard Stallman, 2008/03/11
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Stefan Monnier, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Miles Bader, 2008/03/08
- Re: position on changing defaults?, Stefan Monnier, 2008/03/08
- Re: position on changing defaults?, Richard Stallman, 2008/03/09
- Re: position on changing defaults?, Chong Yidong, 2008/03/10
- Re: position on changing defaults?, Kim F. Storm, 2008/03/11
- Re: position on changing defaults?,
Kim F. Storm <=
- Making the command loop mode-dependent [was: position on changing defaults?], Alan Mackenzie, 2008/03/09
- Re: position on changing defaults?, Richard Stallman, 2008/03/06
- Re: position on changing defaults?, Kim F. Storm, 2008/03/07
- Re: position on changing defaults?, Richard Stallman, 2008/03/08
- Re: position on changing defaults?, Miles Bader, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/09
- Re: position on changing defaults?, Miles Bader, 2008/03/09
- Re: position on changing defaults?, Stefan Monnier, 2008/03/09
- Re: position on changing defaults?, Kim F. Storm, 2008/03/09
- Re: position on changing defaults?, Miles Bader, 2008/03/09