diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-28 23:41:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-28 23:41:52 +0000 |
commit | 10992b014c75c57f34382faf5539df27e9db46cd (patch) | |
tree | fa8885895f4313a81cb06a69acbed97e7a27411a /lisp/indent.el | |
parent | 61946d674c3fcf98479d167d04dda84991a82128 (diff) | |
download | emacs-10992b014c75c57f34382faf5539df27e9db46cd.tar.gz |
(indent-for-tab-command): Pass prefix arg to indent-tab.
(insert-tab): Handle prefix arg.
Diffstat (limited to 'lisp/indent.el')
-rw-r--r-- | lisp/indent.el | 15 |
1 files 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. |