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

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

bug#34301: Unable to make underscore part of a word everywhere


From: Konstantin Kharlamov
Subject: bug#34301: Unable to make underscore part of a word everywhere
Date: Sun, 3 Feb 2019 21:09:48 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

By default the underscore "_" symbol is not being counted as part of a word, even though I have never met a language where it's a separate entity. This means e.g. that upon opening a file one is never being able to "search for word_wth_underscores under cursor", unless they modify current table. This problem haunts many people, e.g. this question has 5576 views for 3 years 11 months https://emacs.stackexchange.com/questions/9583/how-to-treat-underscore-as-part-of-the-word

Known workarounds:
        1. Modify syntax table for every mode you happened to stumble upon.
        2. Use superword-mode

Why workarounds are bad:

1. To make it work one has to search for syntax table name of the current mode, and then to modify config file accordingly, every time a new mode is being met. That's a lot of actions and research overall, a bloating config file; and also lots of work duplication by many Emacs users. 2. superword-mode doesn't do anything to syntax table, and in particular doesn't work with evil-mode.

------

It would be great if Emacs has added a function or what not to just keep underscore as part of a word for all syntax tables by default.





reply via email to

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