summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-05-01 09:28:11 -0500
committerCase Duckworth2022-05-01 09:36:07 -0500
commit4e562b202c2a54d38bc11fea5c872ef95e555e31 (patch)
tree2fad2715f5e343b518dbe17ea778bd3bfe59f119 /lisp
parentAllow passing a list of modes to `+mapc-some-buffers' (diff)
downloademacs-4e562b202c2a54d38bc11fea5c872ef95e555e31.tar.gz
emacs-4e562b202c2a54d38bc11fea5c872ef95e555e31.zip
Add `+indent-rigidly'
This works line-wise if the region isn't active.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el10
1 files changed, 10 insertions, 0 deletions
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]."
417 (when paste (insert paste)) 417 (when paste (insert paste))
418 (get-buffer bufname))) 418 (get-buffer bufname)))
419 419
420(defun +indent-rigidly (arg &optional interactive)
421 "Indent all lines in the region, or the current line.
422This calls `indent-rigidly' and passes ARG to it."
423 (interactive "P\np")
424 (unless (region-active-p)
425 (push-mark)
426 (push-mark (line-beginning-position) nil t)
427 (goto-char (line-end-position)))
428 (call-interactively #'indent-rigidly))
429
420(provide 'acdw) 430(provide 'acdw)
421;;; acdw.el ends here 431;;; acdw.el ends here