unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* insert-char and post-self-insert-hook
@ 2013-01-24 16:33 T.V. Raman
  2013-01-24 18:22 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: T.V. Raman @ 2013-01-24 16:33 UTC (permalink / raw)
  To: emacs-devel

Q: Should insert-char call post-self-insert-hook (doesn't at
present)  to be mutually consistent with self-insert-char --
reasoning:

At least when used for inserting unicode chars via C-x8RET the
end-user behavior of insert-char is very similar to
self-insert-command
-- 

--



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: insert-char and post-self-insert-hook
  2013-01-24 16:33 insert-char and post-self-insert-hook T.V. Raman
@ 2013-01-24 18:22 ` Stefan Monnier
  2013-01-24 23:37   ` T.V. Raman
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-01-24 18:22 UTC (permalink / raw)
  To: T.V. Raman; +Cc: emacs-devel

> Q: Should insert-char call post-self-insert-hook (doesn't at
> present)  to be mutually consistent with self-insert-char --
> reasoning:

I guess we could make insert-char use self-insert-command instead of
insert, indeed.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* insert-char and post-self-insert-hook
  2013-01-24 18:22 ` Stefan Monnier
@ 2013-01-24 23:37   ` T.V. Raman
  2013-01-25 23:32     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: T.V. Raman @ 2013-01-24 23:37 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

Thanks -- which would save me one explicit advice call:-)

On 1/24/13, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> Q: Should insert-char call post-self-insert-hook (doesn't at
>> present)  to be mutually consistent with self-insert-char --
>> reasoning:
>
> I guess we could make insert-char use self-insert-command instead of
> insert, indeed.
>
>
>         Stefan
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: insert-char and post-self-insert-hook
  2013-01-24 23:37   ` T.V. Raman
@ 2013-01-25 23:32     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-01-25 23:32 UTC (permalink / raw)
  To: T.V. Raman; +Cc: emacs-devel

>> I guess we could make insert-char use self-insert-command instead of
>> insert, indeed.
> Thanks -- which would save me one explicit advice call:-)

I see now that it's not so easy: insert-char is called from Elisp at
many places, and many of those shouldn't expand abbrevs, blink parens or
run post-self-insert-hook.

So maybe a better way is to change C-x 8 RET to run another command
than insert-char (which would run self-insert-command).


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-25 23:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 16:33 insert-char and post-self-insert-hook T.V. Raman
2013-01-24 18:22 ` Stefan Monnier
2013-01-24 23:37   ` T.V. Raman
2013-01-25 23:32     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).