怎么定义标点符号为`word'的分隔符?

比如forward-wordtranspose-words等函数,怎么让Emacs在标点符号或特殊符号处断开?

类似这样的效果: (setq sentence-end "\\([。!?]\\)[ \t\n]*")

(modify-syntax-entry ?$ "-")

;; $ will not be recognized as a part of word.
test$foo$bar
2 个赞

谢谢!

第一个参数可用单个字符或cons,似乎跟我预想的效果还是有些出入 :thinking: