all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Avoid trailing space when setting abbrev
@ 2017-07-05 12:46 Harry Putnam
  0 siblings, 0 replies; only message in thread
From: Harry Putnam @ 2017-07-05 12:46 UTC (permalink / raw
  To: help-gnu-emacs

I usually just edit the abbrev file with `M-x edit-abbrev' to set
temporary or permanent abbrevs ... rarely use the interactive form.

So when seting an abbrev... in cperl mode I might call M-x edit-abbrev

and insert something like:

"ffd"     0     "$File::Find::dir"  (then press C-c C-c)
-------       -------       ---=---       -------       -------

The part above the line was already posted accidentally... when I
started to type after the words `(then press)' instead of typing out
`(then press C-c C-c)' I actually pressed those and of course, since
I'm using gnus to post,that sent the message inadvertently.

So to conclude: When I use the new abbrev like:
`ffd<spc>' it inserts `$File::Find::dir<spc>'  Most often that is just
what you want. But not always... I think I would find it more useful
more often to leave out the space.

Finally the question: Short of writing a `define-skeleton'
thingy.. and then associating that to the abbrevs, or calling it
directly, is there a quicker way to get an abbrev that doesn't include
the trialing space.

I realize hitting <RET> instead of <SPC> will have that effect, but
that is only rarely what I want.

(Not the beginning of an editor thread I hope)

If anyone is familiar with the `iab' insert mechanism used in vim, I'm
thinking something along that line where you can instruct the editor
to back up a space after inserting your abbrev with only two or at
least only a few key strokes in the writing of the `iab'.

Is there a notation that can be used in creating an abbrev that
inserts emacs to either delete the space or back up a space?




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-05 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 12:46 Avoid trailing space when setting abbrev Harry Putnam

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.