Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I double click 'abcd_efg', emacs selects the part 'abcd' or 'efg' depending on what I click. How can I select the whole string 'abcd_efg' instead? Thank you.

share|improve this question

migrated from stackoverflow.com Feb 20 '13 at 21:47

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You can call (modify-syntax-entry ?_ "w") that will define underscore as part of the word.

share|improve this answer

Either do what @jcubic suggested or just double-click the _ char in the symbol name. That's what I do.

That way, you can do either: select a word (e.g., a piece of a symbol name) or select an entire symbol name. Yes, you have to pay a little more attention to where you click, but you get more flexibility.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.