all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* abbrevs, skeletons, and comments
@ 2007-06-02 14:34 nobrowser
  2007-06-03  3:24 ` Tim X
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: nobrowser @ 2007-06-02 14:34 UTC (permalink / raw)
  To: help-gnu-emacs

In a module I'm writing, I'd like to bind abbrevs to code skeletons,
similar to what is done e.g. by sml-mode.  But expanding the abbrevs
makes no sense when the point is inside a comment (or a string
literal).  So I'd like to conditionally stop expansion.  The main
opportunity for that seems to be pre-abbrev-expand-hook, but there are
only two ways it can stop an expansion: 1, throw an error, 2, change
the abbrev bindings (either by making changes in the current table or
by swapping in a whole new table). 1 is unacceptable - how many errors
before user gets mad and disables abbrevs altogether? 2, how to undo
the changes when the point leaves the comment or string?

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

end of thread, other threads:[~2007-06-14 18:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-02 14:34 abbrevs, skeletons, and comments nobrowser
2007-06-03  3:24 ` Tim X
2007-06-03  4:44   ` nobrowser
2007-06-03 10:32     ` Tim X
2007-06-03 13:31       ` nobrowser
2007-06-03 11:43     ` Andreas Roehler
2007-06-11  9:20 ` Johan Bockgård
2007-06-12 13:50 ` Stefan Monnier
2007-06-14 18:30   ` Johan Bockgård

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.