Emacs Lisp有replace-string
,但没有replace-char
。我想用常规的ASCII引号替换“打印” curl 引号(此字符的Emacs代码为十六进制53979),我可以这样:
(replace-string (make-string 1 ?\x53979) "'")
我认为
replace-char
会更好。做这个的最好方式是什么?
最佳答案
为什么不只是使用
(replace-string "\x53979" "'")
或者
(while (search-forward "\x53979" nil t)
(replace-match "'" nil t))
如文档中所建议的那样,替换字符串?
关于emacs - Emacs Lisp中的replace-char?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/90977/