Alternative to forward-word / backward-word to include symbols — e.g., ***

陌路散爱 提交于 2019-11-28 01:13:05

Add to the mode hook of the mode, where you are editing the text:

(modify-syntax-entry ?* "w")

Read here for more info.

Note that this will make other functions treat asterisks as if they were word constituent (though, you'd probably want it, as you'd soon discover that not only the motion command behave contrary to how you want them to).

Another way to overload only these particular commands would be to advise them with defadvice and to temporarily alter the syntax table just for the duration of the function.

You might like Emacs-24.4's superword-mode.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!