(defun my-delete-indentation (start end)
"Delete all leading whitespace within the current region."
(interactive "*r")
(replace-regexp "^[[:space:]]+" "" nil start end))
Run Code Online (Sandbox Code Playgroud)
(delete-indentation并且在Emacs中有一个函数,但它对此做了一些不同的事情.)