all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* special char in abbrev
@ 2005-08-15 18:55 Baloff
  2005-08-16 13:10 ` rgb
  0 siblings, 1 reply; 2+ messages in thread
From: Baloff @ 2005-08-15 18:55 UTC (permalink / raw)


Hello

I am trying to define an abbrev, after reading in the info docs I went
to try it, works. but, how can I use 
'beginning of line character''pound symbol''the letter i' as an
abbrev. I am trying to expand
#i
to 
#include
only when typed at the beginning of a line.

it will not work, it will only use 'i' as an abbrev. 

hey,, thanks for all the help, I am waiting for a book to get me to
the level where I can use the info docs more effectively, then I will
be a much less bother.

thanks again for putting up with me

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

* Re: special char in abbrev
  2005-08-15 18:55 special char in abbrev Baloff
@ 2005-08-16 13:10 ` rgb
  0 siblings, 0 replies; 2+ messages in thread
From: rgb @ 2005-08-16 13:10 UTC (permalink / raw)


> I am trying to define an abbrev,
> #i
> to
> #include

I had a similar problem when writing TACL mode where all keywords
begin with #.  IIRC abbrev only looks at characters with word syntax.
Since modifying the mode's syntax table can have all kinds of effects
the easiest solution might be to do something more along these lines.

(add-hook foo-mode-hook
  (lambda () (local-set-key [?\C-c ?i] "#include")))

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

end of thread, other threads:[~2005-08-16 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-15 18:55 special char in abbrev Baloff
2005-08-16 13:10 ` rgb

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.