[ESS] Recognizing "_" as part of word when double-clicking in ESS mode

Vitalie Spinu spinuvit at gmail.com
Mon Jan 7 16:43:29 CET 2013


  >> Matthew Pettis <matthew.pettis at gmail.com>
  >> on Mon, 7 Jan 2013 09:25:35 -0600 wrote:

  > Thanks Rodney!

  > Looking in that file, I see the line:

  > (modify-syntax-entry ?_  "_"  S-syntax-table)

  > Do I need to comment out this line and replace with the one above, or
  > override it somewhere else downscript with the line above:

  > (modify-syntax-entry ?_ "w")

Putting this in ess-mode-hook will also work.

In my opinion this is not the best idea. Emacs is keyboard oriented
software, and if you modify something as fundamental as syntax table for
the sake of a mouse click convenience, you are likely making a move in a
wrong direction.

Emacs word movement commands (M-f, M-b) will not stop at _. For people
who use "_" in their programming (like myself), that would be extremely
annoying.

Have you considered M-f M-f as an alternative for a mouse click?

    Vitalie



More information about the ESS-help mailing list