[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [h-e-w] c-mode : can't expand '#d' to '#define'
From: |
Chris Ring |
Subject: |
RE: [h-e-w] c-mode : can't expand '#d' to '#define' |
Date: |
Tue, 24 Sep 2002 14:12:55 -0700 |
Jeff,
This is because the '#' character isn't recognized as part of a word. Add the
following to your .emacs file:
(modify-syntax-entry ?\# "w")
Chris
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Jeff Rancier
> Sent: Tuesday, September 24, 2002 10:35 AM
> To: Emacs Help (Windows)
> Subject: [h-e-w] c-mode : can't expand '#d' to '#define'
>
>
> 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