* c-mode : can't expand '#d' to '#define'
@ 2002-09-24 17:35 Jeff Rancier
2002-09-24 19:52 ` Kai Großjohann
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Rancier @ 2002-09-24 17:35 UTC (permalink / raw)
Hello All:
In c-mode, I have the following:
(defconst c-expand-list '(
("#d" "#define ")
("d" "do\n{\n\n} while();" (6 15))
("de" "default:")
) "Expansions for C mode" )
(defun c-mode-expand-add-hooks ()
(expand-add-abbrevs c-mode-abbrev-table c-expand-list))
(add-hook 'c-mode-hook 'c-mode-expand-add-hooks)
When I type #d followed by a space, I get the do expansion. Can anyone
explain this?
--
Thanks,
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c-mode : can't expand '#d' to '#define'
2002-09-24 17:35 c-mode : can't expand '#d' to '#define' Jeff Rancier
@ 2002-09-24 19:52 ` Kai Großjohann
2002-09-30 1:24 ` Luis Fernandes
0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-09-24 19:52 UTC (permalink / raw)
"Jeff Rancier" <jeff.rancier@softechnics.com> writes:
> When I type #d followed by a space, I get the do expansion. Can anyone
> explain this?
Abbrevs are intended for words, presumably # is not part of the word
and thus ignored. (If you had made an expansion for " d", you'd have
seen the same.)
kai
--
~/.signature is: umop 3p!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c-mode : can't expand '#d' to '#define'
2002-09-24 19:52 ` Kai Großjohann
@ 2002-09-30 1:24 ` Luis Fernandes
2002-09-30 12:54 ` Clemens Fischer
2002-09-30 14:29 ` Kai Großjohann
0 siblings, 2 replies; 6+ messages in thread
From: Luis Fernandes @ 2002-09-30 1:24 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
Kai> Abbrevs are intended for words, presumably # is not part of
Kai> the word and thus ignored. (If you had made an expansion
Kai> for " d", you'd have seen the same.)
I miss the abbrev functionality when $SomeReallyLongVariable M-/
fails to expand in c-perl/shell mode.
Perhaps it can be expanded to the programming modes too or atleast
put on the TODO list.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c-mode : can't expand '#d' to '#define'
2002-09-30 1:24 ` Luis Fernandes
@ 2002-09-30 12:54 ` Clemens Fischer
2002-09-30 14:29 ` Kai Großjohann
1 sibling, 0 replies; 6+ messages in thread
From: Clemens Fischer @ 2002-09-30 12:54 UTC (permalink / raw)
Luis Fernandes <elf@ee.ryerson.ca> writes:
> I miss the abbrev functionality when $SomeReallyLongVariable M-/
> fails to expand in c-perl/shell mode.
isn't it possible to frob the syntax-map for that particular mode to
include the dollar sign in the set of characters making up a word?
clemens
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c-mode : can't expand '#d' to '#define'
2002-09-30 1:24 ` Luis Fernandes
2002-09-30 12:54 ` Clemens Fischer
@ 2002-09-30 14:29 ` Kai Großjohann
2002-09-30 23:55 ` Luis Fernandes
1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-09-30 14:29 UTC (permalink / raw)
Luis Fernandes <elf@ee.ryerson.ca> writes:
>>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
>
> Kai> Abbrevs are intended for words, presumably # is not part of
> Kai> the word and thus ignored. (If you had made an expansion
> Kai> for " d", you'd have seen the same.)
>
> I miss the abbrev functionality when $SomeReallyLongVariable M-/
> fails to expand in c-perl/shell mode.
Note that M-/ and abbrevs are two completely different features.
What happens when you M-/ in CPerl?
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-30 23:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-24 17:35 c-mode : can't expand '#d' to '#define' Jeff Rancier
2002-09-24 19:52 ` Kai Großjohann
2002-09-30 1:24 ` Luis Fernandes
2002-09-30 12:54 ` Clemens Fischer
2002-09-30 14:29 ` Kai Großjohann
2002-09-30 23:55 ` Luis Fernandes
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.