From 10992b014c75c57f34382faf5539df27e9db46cd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 28 Apr 1996 23:41:52 +0000 Subject: [PATCH] (indent-for-tab-command): Pass prefix arg to indent-tab. (insert-tab): Handle prefix arg. --- lisp/indent.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/indent.el b/lisp/indent.el index 89c75472bc3..6c2f1462de9 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -43,17 +43,18 @@ Function to indent current line.") "Indent line in proper way for current major mode." (interactive "P") (if (eq indent-line-function 'indent-to-left-margin) - (insert-tab) + (insert-tab prefix-arg) (if prefix-arg (funcall indent-line-function prefix-arg) (funcall indent-line-function)))) -(defun insert-tab () - (if abbrev-mode - (expand-abbrev)) - (if indent-tabs-mode - (insert ?\t) - (indent-to (* tab-width (1+ (/ (current-column) tab-width)))))) +(defun insert-tab (&optional prefix-arg) + (let ((count (prefix-numeric-value prefix-arg))) + (if abbrev-mode + (expand-abbrev)) + (if indent-tabs-mode + (insert ?\t count) + (indent-to (* tab-width (+ count (/ (current-column) tab-width))))))) (defun indent-rigidly (start end arg) "Indent all lines starting in the region sideways by ARG columns. -- 2.39.5