作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图让下划线被视为 forward/backward-word
的词的一部分功能如所述 here和 here .我特别想让它为 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)
最佳答案
您是否尝试过修改 nxhtml-mode-hook
直接地?像这样:
(add-hook 'nxhtml-mode-hook
(lambda () (modify-syntax-entry ?_ "w")))
关于emacs - 下划线作为单词的一部分以表示前向词不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10666178/
我是一名优秀的程序员,十分优秀!