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

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

Re: C++ Mode: Interpretation of Underscores In Words


From: kgold
Subject: Re: C++ Mode: Interpretation of Underscores In Words
Date: 12 Nov 2003 18:54:57 GMT

Joe Mama <spartanquarters@yahoo.com> writes:
> Given a variable like "employee_name" is there a way to make emacs
> treat this as one word.  Would be nice when doing commands like
> "forward-word" which treats employee_name as two words.

Here are the two steps you need to do.  Both are required!

1 - Reconfigure your client to turn off HTML when posting to news
    groups and mailing lists.

2 - Add this to your .emacs:

(add-hook 'c-mode-common-hook
          (function (lambda ()
                (modify-syntax-entry ?_ "w" c++-mode-syntax-table)
                (modify-syntax-entry ?_ "w" c-mode-syntax-table)
                (modify-syntax-entry ?_ "w" java-mode-syntax-table)
)))


-- 


reply via email to

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