From 4e562b202c2a54d38bc11fea5c872ef95e555e31 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 1 May 2022 09:28:11 -0500 Subject: Add `+indent-rigidly' This works line-wise if the region isn't active. --- lisp/acdw.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/acdw.el') diff --git a/lisp/acdw.el b/lisp/acdw.el index ac17e46..2f41e15 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -417,5 +417,15 @@ NOMODE will be set when called with \\[universal-argument]." (when paste (insert paste)) (get-buffer bufname))) +(defun +indent-rigidly (arg &optional interactive) + "Indent all lines in the region, or the current line. +This calls `indent-rigidly' and passes ARG to it." + (interactive "P\np") + (unless (region-active-p) + (push-mark) + (push-mark (line-beginning-position) nil t) + (goto-char (line-end-position))) + (call-interactively #'indent-rigidly)) + (provide 'acdw) ;;; acdw.el ends here -- cgit 1.4.1-21-gabe81