diff options
| author | Stefan Monnier | 2003-03-14 23:11:20 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-03-14 23:11:20 +0000 |
| commit | f202a7a25fe924cab046b040052320ebbd016c40 (patch) | |
| tree | 87eb7dc9ed7d3c4ad7361604f7b43ca96c1aedac | |
| parent | 225c7a073290d64f90a5cd483697a03ce289ae1b (diff) | |
| download | emacs-f202a7a25fe924cab046b040052320ebbd016c40.tar.gz emacs-f202a7a25fe924cab046b040052320ebbd016c40.zip | |
(indent-for-tab-command): If tab-always-indent is non-nil
and the user hits TAB a second time, just insert a tab.
| -rw-r--r-- | lisp/indent.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index 2231b478418..f742f254321 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -49,7 +49,7 @@ Don't rebind TAB unless you really need to.") | |||
| 49 | "*Controls the operation of the TAB key. | 49 | "*Controls the operation of the TAB key. |
| 50 | If t, hitting TAB always just indents the current line. | 50 | If t, hitting TAB always just indents the current line. |
| 51 | If nil, hitting TAB indents the current line if point is at the left margin | 51 | If nil, hitting TAB indents the current line if point is at the left margin |
| 52 | or in the line's indentation, otherwise it insert a `real' tab character." | 52 | or in the line's indentation, otherwise it insert a \"real\" tab character." |
| 53 | :group 'indent | 53 | :group 'indent |
| 54 | :type '(choice (const nil) (const t) (const always))) | 54 | :type '(choice (const nil) (const t) (const always))) |
| 55 | 55 | ||
| @@ -87,7 +87,8 @@ The function actually called to indent is determined by the value of | |||
| 87 | ;; so we force it to always insert a tab here. | 87 | ;; so we force it to always insert a tab here. |
| 88 | (eq indent-line-function 'indent-to-left-margin) | 88 | (eq indent-line-function 'indent-to-left-margin) |
| 89 | (and (not tab-always-indent) | 89 | (and (not tab-always-indent) |
| 90 | (> (current-column) (current-indentation)))) | 90 | (or (> (current-column) (current-indentation)) |
| 91 | (eq this-command last-command)))) | ||
| 91 | (insert-tab arg)) | 92 | (insert-tab arg)) |
| 92 | ;; Those functions are meant specifically for tabbing and not for | 93 | ;; Those functions are meant specifically for tabbing and not for |
| 93 | ;; indenting, so we can't pass them to indent-according-to-mode. | 94 | ;; indenting, so we can't pass them to indent-according-to-mode. |
| @@ -172,7 +173,7 @@ interactively or with optional argument FORCE, it will be fixed." | |||
| 172 | ((and force (< cc lm)) | 173 | ((and force (< cc lm)) |
| 173 | (indent-to-left-margin))))) | 174 | (indent-to-left-margin))))) |
| 174 | 175 | ||
| 175 | ;; This is the default indent-line-function, | 176 | ;; This used to be the default indent-line-function, |
| 176 | ;; used in Fundamental Mode, Text Mode, etc. | 177 | ;; used in Fundamental Mode, Text Mode, etc. |
| 177 | (defun indent-to-left-margin () | 178 | (defun indent-to-left-margin () |
| 178 | "Indent current line to the column given by `current-left-margin'." | 179 | "Indent current line to the column given by `current-left-margin'." |