Following this answer, when I type (modify-syntax-entry ?_ "w")
and do M-x eval-region
, it has the effect I'm looking for, albeit only for that buffer. I've put (modify-syntax-entry ?_ "w")
in my .emacs
file, however and after restarting, it's not having effect in my C/C++ code.
I'm using Emacs GNU Emacs 26.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.13) of 2019-12-11
. My OS is: Fedora release 31 (Thirty One)
.
There are questions with nearly the exact same title, but their accepted answers do not work for C/C++ mode, so this is a different question.
Wrong type argument: symbolp, ((lambda nil (set (make-local-variable (quote whitespace-line-column)) 127)))
unless I put a single quote before c++-mode-hook:(add-hook 'c++-mode-hook 'superword-mode)
– sage Sep 02 '22 at 19:07