Move indent-defun to editing library
This commit is contained in:
parent
7fde32a3c5
commit
40b26e86cf
2 changed files with 9 additions and 8 deletions
|
@ -148,13 +148,6 @@ MODE1 is enabled and vice-versa."
|
|||
"Set the `disabled' property for each item in FUNCTIONS to nil."
|
||||
(mapc #'(lambda (f) (put f 'disabled nil)) functions))
|
||||
|
||||
(defun indent-defun ()
|
||||
"Indent the current defun."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(mark-defun)
|
||||
(indent-region (region-beginning) (region-end))))
|
||||
|
||||
(defun oni:eshell-C-d ()
|
||||
"Either call `delete-char' interactively or quit."
|
||||
(interactive)
|
||||
|
@ -1132,7 +1125,7 @@ If no direction is given, don't split."
|
|||
(global-set-key (kbd "C-M-d") 'kill-word)
|
||||
(global-set-key (kbd "C-M-w") 'backward-kill-word)
|
||||
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands)
|
||||
(global-set-key (kbd "C-M-z") 'indent-defun)
|
||||
(global-set-key (kbd "C-M-z") 'oni:indent-defun)
|
||||
(global-set-key (kbd "C-S-k") 'kill-whole-line)
|
||||
(global-set-key (kbd "C-c +") #'oni:increase-number-at-point)
|
||||
(global-set-key (kbd "C-c -") #'oni:decrease-number-at-point)
|
||||
|
|
|
@ -57,6 +57,14 @@
|
|||
(interactive)
|
||||
(oni:change-number-at-point #'1+))
|
||||
|
||||
;;;###autoload
|
||||
(defun oni:indent-defun ()
|
||||
"Indent the current defun."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(mark-defun)
|
||||
(indent-region (region-beginning) (region-end))))
|
||||
|
||||
;;;###autoload
|
||||
(defun oni:upcase-prev (num)
|
||||
(interactive "p")
|
||||
|
|
Loading…
Reference in a new issue