emacs: restore position of point in reindent-buffer
This commit is contained in:
parent
b8a7cd653d
commit
f2c59a223a
1 changed files with 3 additions and 2 deletions
|
@ -28,8 +28,9 @@
|
||||||
(defun reindent-buffer (start end &optional column)
|
(defun reindent-buffer (start end &optional column)
|
||||||
"Reindent the current buffer."
|
"Reindent the current buffer."
|
||||||
(interactive "r\nP")
|
(interactive "r\nP")
|
||||||
|
(save-excursion
|
||||||
(mark-whole-buffer)
|
(mark-whole-buffer)
|
||||||
(indent-region start end column))
|
(indent-region start end column)))
|
||||||
(global-set-key (kbd "C-c C-r i") 'reindent-buffer)
|
(global-set-key (kbd "C-c C-r i") 'reindent-buffer)
|
||||||
|
|
||||||
(defun edit-init-file ()
|
(defun edit-init-file ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue