aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-04-28 23:41:52 +0000
committerRichard M. Stallman1996-04-28 23:41:52 +0000
commit10992b014c75c57f34382faf5539df27e9db46cd (patch)
treefa8885895f4313a81cb06a69acbed97e7a27411a
parent61946d674c3fcf98479d167d04dda84991a82128 (diff)
downloademacs-10992b014c75c57f34382faf5539df27e9db46cd.tar.gz
emacs-10992b014c75c57f34382faf5539df27e9db46cd.zip
(indent-for-tab-command): Pass prefix arg to indent-tab.
(insert-tab): Handle prefix arg.
-rw-r--r--lisp/indent.el15
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.")
43 "Indent line in proper way for current major mode." 43 "Indent line in proper way for current major mode."
44 (interactive "P") 44 (interactive "P")
45 (if (eq indent-line-function 'indent-to-left-margin) 45 (if (eq indent-line-function 'indent-to-left-margin)
46 (insert-tab) 46 (insert-tab prefix-arg)
47 (if prefix-arg 47 (if prefix-arg
48 (funcall indent-line-function prefix-arg) 48 (funcall indent-line-function prefix-arg)
49 (funcall indent-line-function)))) 49 (funcall indent-line-function))))
50 50
51(defun insert-tab () 51(defun insert-tab (&optional prefix-arg)
52 (if abbrev-mode 52 (let ((count (prefix-numeric-value prefix-arg)))
53 (expand-abbrev)) 53 (if abbrev-mode
54 (if indent-tabs-mode 54 (expand-abbrev))
55 (insert ?\t) 55 (if indent-tabs-mode
56 (indent-to (* tab-width (1+ (/ (current-column) tab-width)))))) 56 (insert ?\t count)
57 (indent-to (* tab-width (+ count (/ (current-column) tab-width)))))))
57 58
58(defun indent-rigidly (start end arg) 59(defun indent-rigidly (start end arg)
59 "Indent all lines starting in the region sideways by ARG columns. 60 "Indent all lines starting in the region sideways by ARG columns.