diff options
| author | Richard M. Stallman | 2004-09-20 16:09:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-09-20 16:09:32 +0000 |
| commit | 1d1c5af904afe595cee12cd6c05e60694111cce5 (patch) | |
| tree | 0870851aa104951b3dad30e1564b46d287ee2bed | |
| parent | fd4f1b364f0407a013cb1a2380ae2e99b0d50473 (diff) | |
| download | emacs-1d1c5af904afe595cee12cd6c05e60694111cce5.tar.gz emacs-1d1c5af904afe595cee12cd6c05e60694111cce5.zip | |
(move-to-left-margin): Special case for minibuffer.
| -rw-r--r-- | lisp/indent.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index 2d223b05ad6..3f423adbace 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -164,14 +164,18 @@ interactively or with optional argument FORCE, it will be fixed." | |||
| 164 | (interactive (list (prefix-numeric-value current-prefix-arg) t)) | 164 | (interactive (list (prefix-numeric-value current-prefix-arg) t)) |
| 165 | (beginning-of-line n) | 165 | (beginning-of-line n) |
| 166 | (skip-chars-forward " \t") | 166 | (skip-chars-forward " \t") |
| 167 | (let ((lm (current-left-margin)) | 167 | (if (minibufferp (current-buffer)) |
| 168 | (cc (current-column))) | 168 | (if (save-excursion (beginning-of-line) (bobp)) |
| 169 | (cond ((> cc lm) | 169 | (goto-char (minibuffer-prompt-end)) |
| 170 | (if (> (move-to-column lm force) lm) | 170 | (beginning-of-line)) |
| 171 | ;; If lm is in a tab and we are not forcing, move before tab | 171 | (let ((lm (current-left-margin)) |
| 172 | (backward-char 1))) | 172 | (cc (current-column))) |
| 173 | ((and force (< cc lm)) | 173 | (cond ((> cc lm) |
| 174 | (indent-to-left-margin))))) | 174 | (if (> (move-to-column lm force) lm) |
| 175 | ;; If lm is in a tab and we are not forcing, move before tab | ||
| 176 | (backward-char 1))) | ||
| 177 | ((and force (< cc lm)) | ||
| 178 | (indent-to-left-margin)))))) | ||
| 175 | 179 | ||
| 176 | ;; This used to be the default indent-line-function, | 180 | ;; This used to be the default indent-line-function, |
| 177 | ;; used in Fundamental Mode, Text Mode, etc. | 181 | ;; used in Fundamental Mode, Text Mode, etc. |