From 37e7f05bcfa9fe3918d4fd1cb5bb1376e03f025f Mon Sep 17 00:00:00 2001 From: rearman Date: Tue, 14 Oct 2025 10:20:50 -0400 Subject: [PATCH] Cleanup interactive calls Get rid of 'call-interactively' where possible. --- re/re-editing-defuns.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/re/re-editing-defuns.el b/re/re-editing-defuns.el index e17665c..4a70985 100644 --- a/re/re-editing-defuns.el +++ b/re/re-editing-defuns.el @@ -14,7 +14,7 @@ (interactive "*p") (end-of-line) (open-line n) - (call-interactively (next-line)) + (next-line 1) (indent-for-tab-command)) (defun re/open-line-above (n) @@ -56,12 +56,12 @@ Arg works on `mark-defun'." (mark-defun arg) (kill-region (region-beginning) (region-end))) -(defun re/kill-bword-or-region () - "Kill region if active, otherwise kill back one word." - (interactive) - (if (use-region-p) - (call-interactively 'kill-region) - (call-interactively 'backward-kill-word))) +(defun re/kill-bword-or-region (&optional arg) +"Kill region if active, otherwise kill back one word." +(interactive "p") +(if (use-region-p) + (kill-region (region-beginning) (region-end)) + (backward-kill-word arg))) (defun re/smart-beginning-of-line () "Move point to first non-whitespace character or `beginning-of-visual-line'. @@ -113,7 +113,7 @@ If in org-mode, call `org-end-of-line' first." (add-to-history 'search-ring (buffer-substring (region-beginning) (region-end))) (deactivate-mark)) - (call-interactively 'isearch-forward)) + (isearch-forward)) (defun re/isearch-backward-use-region () "Search text in region if active, otherwise normal backward search." @@ -122,7 +122,7 @@ If in org-mode, call `org-end-of-line' first." (add-to-history 'search-ring (buffer-substring (region-beginning) (region-end))) (deactivate-mark)) - (call-interactively 'isearch-backward)) + (isearch-backward)) (defun Tab (width) "Give me a function analagous to the Acme `Tab' command" -- 2.39.5