all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* define-skeleton and define-abbrev simple example mystery, `w' -> `wxT("")' newline-and-indents? Why?
@ 2007-07-16 18:49 Enselic
  2007-07-17  6:26 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Enselic @ 2007-07-16 18:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

if you evaluate

  (define-skeleton wx-string
    "" nil
    "wxT(\"" _ "\")")

  (define-abbrev global-abbrev-table "w" "" 'wx-string)

And switch buffer to *scratch*, then on a new line type

  s o m e SPC w o r d M-b w SPC

the result will be

  some wxT("")
  word

instead of

  some wxT("") word

and I fail to understand why. It seems to do a newline-and-indent
without any > or any \n in the skeleton.

I have read documentation and tried different variants of the define-
skeleton, but I seem to be missing something.

Does anyone know what is going on here?

Thank you,
- Martin Nordholts

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

* Re: define-skeleton and define-abbrev simple example mystery, `w' -> `wxT("")' newline-and-indents? Why?
  2007-07-16 18:49 define-skeleton and define-abbrev simple example mystery, `w' -> `wxT("")' newline-and-indents? Why? Enselic
@ 2007-07-17  6:26 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-07-17  6:26 UTC (permalink / raw)
  To: help-gnu-emacs

> and I fail to understand why. It seems to do a newline-and-indent
> without any > or any \n in the skeleton.

IIRC it's a misfeature of the default value of skeleton-end-hook.
I haven't dared to remove it because it may break older skeletons that want
the final \n but don't have it explicitly in their definition.
Just set skeleton-end-hook by hand in your major mode.


        Stefan

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

end of thread, other threads:[~2007-07-17  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 18:49 define-skeleton and define-abbrev simple example mystery, `w' -> `wxT("")' newline-and-indents? Why? Enselic
2007-07-17  6:26 ` Stefan Monnier

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.