branch: externals/objed commit be4c3cd3d46f7c5226f4ce4d1ee8b7831f572a6c Author: Clemens Radermacher <clem...@posteo.net> Commit: Clemens Radermacher <clem...@posteo.net>
Make indenting defuns repeatable, too --- objed.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/objed.el b/objed.el index b839b53..c2e8e63 100644 --- a/objed.el +++ b/objed.el @@ -599,19 +599,20 @@ selected one." (key-binding "q" nil t)))) (if (and (string-match "insert" (symbol-name nc)) (not buffer-read-only)) - (cond ((or (eq major-mode 'fundamental-mode) - (derived-mode-p 'text-mode) - (objed--at-comment-p) - (objed--in-string-or-comment-p)) - (when (eq last-command this-command) - (objed-next)) - (call-interactively 'fill-paragraph) - (objed--switch-to 'textblock) - (message "Filled paragraph.")) - ((objed--switch-to 'defun) - (indent-region (objed--beg) (objed--end)) - (objed--update-current-object) - (message "Indented defun."))) + (progn + (when (eq last-command this-command) + (objed-next)) + (cond ((or (eq major-mode 'fundamental-mode) + (derived-mode-p 'text-mode) + (objed--at-comment-p) + (objed--in-string-or-comment-p)) + (call-interactively 'fill-paragraph) + (objed--switch-to 'textblock) + (message "Filled paragraph.")) + ((objed--switch-to 'defun) + (indent-region (objed--beg) (objed--end)) + (objed--update-current-object) + (message "Indented defun.")))) (objed--reset) (call-interactively nc))))