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 "_"))))