help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Symbols as words?


From: Jambunathan K
Subject: Re: Symbols as words?
Date: Sun, 26 Aug 2012 21:24:49 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Raffaele Ricciardi <rfflrccrd@gmail.com> writes:

> On 26/08/12 15:35, Jude DaShiell wrote:
>> abbrev-mode might work in this case once a dictionary of abbreviations
>> is built or downloaded if available.
>
> Thank you for your help, but that is not what I'm looking for.  I'm looking
> for a way to make commands that work on words - e.g. `forward-word',
> `backward-word', `kill-word', etc. - work on symbols instead.


    (add-hook 'c-mode-hook
              (lambda ()
                (modify-syntax-entry ?_ "w")))

,---- From (info "(elisp) Syntax Class Table")
| Symbol constituents: `_'
|      Extra characters used in variable and command names along with word
|      constituents.  Examples include the characters `$&*+-_<>' in Lisp
|      mode, which may be part of a symbol name even though they are not
|      part of English words.  In standard C, the only
|      non-word-constituent character that is valid in symbols is
|      underscore (`_').
`----

>
>

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]