unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16138: 24.3; skeleton-end-hook not run
@ 2013-12-14  7:20 Leo Liu
  2013-12-18 18:39 ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2013-12-14  7:20 UTC (permalink / raw)
  To: 16138

I had to make use of skeleton-end-hook and was surprised to find that it
actually doesn't work.

1. Emacs -q
2. (setq skeleton-pair t)
3. (global-set-key "(" 'skeleton-pair-insert-maybe)
4. (add-hook 'skeleton-end-hook (lambda () (error "bomb!!!")))

now try ( to trigger skeleton-pair-insert-maybe in some buffer and
nothing should happen.

Leo





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

* bug#16138: 24.3; skeleton-end-hook not run
  2013-12-14  7:20 bug#16138: 24.3; skeleton-end-hook not run Leo Liu
@ 2013-12-18 18:39 ` Glenn Morris
  2013-12-19  2:54   ` Leo Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2013-12-18 18:39 UTC (permalink / raw)
  To: Leo Liu; +Cc: 16138


skeleton-pair-insert-maybe explicitly ignores skeleton-end-hook.
If you want to change that, I imagine you have to factor out the default
non-nil value of skeleton-end-hook.





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

* bug#16138: 24.3; skeleton-end-hook not run
  2013-12-18 18:39 ` Glenn Morris
@ 2013-12-19  2:54   ` Leo Liu
  2013-12-19 13:38     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2013-12-19  2:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16138

On 2013-12-19 02:39 +0800, Glenn Morris wrote:
> skeleton-pair-insert-maybe explicitly ignores skeleton-end-hook.
> If you want to change that, I imagine you have to factor out the default
> non-nil value of skeleton-end-hook.

I see. It was let-bound to nil. Any idea why it was disabled there?

Leo





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

* bug#16138: 24.3; skeleton-end-hook not run
  2013-12-19  2:54   ` Leo Liu
@ 2013-12-19 13:38     ` Stefan Monnier
  2013-12-20  0:41       ` Leo Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-12-19 13:38 UTC (permalink / raw)
  To: Leo Liu; +Cc: 16138

>> skeleton-pair-insert-maybe explicitly ignores skeleton-end-hook.
>> If you want to change that, I imagine you have to factor out the default
>> non-nil value of skeleton-end-hook.
> I see. It was let-bound to nil. Any idea why it was disabled there?

Because the default value inserts a newline, which is not desired for
paren-pairs.


        Stefan





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

* bug#16138: 24.3; skeleton-end-hook not run
  2013-12-19 13:38     ` Stefan Monnier
@ 2013-12-20  0:41       ` Leo Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Liu @ 2013-12-20  0:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 16138-done

Version: 24.4

On 2013-12-19 21:38 +0800, Stefan Monnier wrote:
> Because the default value inserts a newline, which is not desired for
> paren-pairs.

I fix it by let-binding skeleton-end-newline to nil instead. It is odd
that skeleton-end-hook is not called at all.

Leo





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

end of thread, other threads:[~2013-12-20  0:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14  7:20 bug#16138: 24.3; skeleton-end-hook not run Leo Liu
2013-12-18 18:39 ` Glenn Morris
2013-12-19  2:54   ` Leo Liu
2013-12-19 13:38     ` Stefan Monnier
2013-12-20  0:41       ` Leo Liu

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