Emacs功能消除了所有缩进

tjb*_*tjb 2 emacs

是否有一个emacs函数可以消除区域中的所有缩进(即在第一个非空白字符之前的所有空格)?

如果没有,我应该在我的.emacs中添加哪些代码片段来完成此操作?

phi*_*ils 5

(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中有一个函数,但它对此做了一些不同的事情.)