我试图让下划线被视为此处和此处forward/backward-word
描述的函数的单词的一部分。我特别想让它在模式下工作,但真的希望它在所有模式下都能像这样工作。nxhtml
我site-start.el
用多种不同的方式修改了我的文件,但无济于事。但是如果我在缓冲区中手动执行命令M-x modify-syntax-table
,它就可以正常工作。我只是不能让它成为默认行为。
这是我尝试放入site-start.el
文件的内容:
;; 1
;; thought this would apply it to all modes - no error, but did not work
(modify-syntax-entry ?_ "w")
;; 2
;; thought this would automatically set it on a mode change - no error, but did not work
(defun change-major-mode-hook ()
(modify-syntax-entry ?_ "w"))
;; 3
;; thought this would apply it to all modes - no error, but did not work
(modify-syntax-entry ?_ "w")
;; 4
;; this produced a symbol's value as variable is void error
(modify-syntax-entry ?_ "w" nxhtml-mode-syntax-table)
我错过了什么?