1
我想将文本的标记区域更改为全部小写字母由连接的字词下划线。例如:小写字母和下划线连接的函数
A fox caught a bird => a_fox_caught_a_bird
什么是的Emacs 23的功能?
我想将文本的标记区域更改为全部小写字母由连接的字词下划线。例如:小写字母和下划线连接的函数
A fox caught a bird => a_fox_caught_a_bird
什么是的Emacs 23的功能?
没有内置的功能,你想要做什么,但这个片段会做的伎俩。
(defun lower-and-concat (b e)
(interactive "r")
(save-restriction
(narrow-to-region b e)
(goto-char (point-min))
(downcase-region b e)
(while (re-search-forward "[ \t]+" nil t)
(replace-match "_"))))