我在 Emacs 中有以下代码删除突出显示区域中的换行符:
(defun remove-newlines-in-region ()
"Removes all newlines in the region."
(interactive)
(save-restriction
(narrow-to-region (point) (mark))
(goto-char (point-min))
(while (search-forward "\n" nil t) (replace-match "" nil t))))
我会扩展此功能以自动将结果复制(而不是杀死)到杀死环。我怎样才能做到这一点?