changeset 57164:11b507f888a6

(move-to-left-margin): Special case for minibuffer.
author Richard M. Stallman <rms@gnu.org>
date Mon, 20 Sep 2004 16:09:32 +0000
parents 22cfa0559b07
children 996392344f62
files lisp/indent.el
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/indent.el	Mon Sep 20 15:59:31 2004 +0000
+++ b/lisp/indent.el	Mon Sep 20 16:09:32 2004 +0000
@@ -164,14 +164,18 @@
   (interactive (list (prefix-numeric-value current-prefix-arg) t))
   (beginning-of-line n)
   (skip-chars-forward " \t")
-  (let ((lm (current-left-margin))
-	(cc (current-column)))
-    (cond ((> cc lm)
-	   (if (> (move-to-column lm force) lm)
-	       ;; If lm is in a tab and we are not forcing, move before tab
-	       (backward-char 1)))
-	  ((and force (< cc lm))
-	   (indent-to-left-margin)))))
+  (if (minibufferp (current-buffer))
+      (if (save-excursion (beginning-of-line) (bobp))
+	  (goto-char (minibuffer-prompt-end))
+	(beginning-of-line))
+    (let ((lm (current-left-margin))
+	  (cc (current-column)))
+      (cond ((> cc lm)
+	     (if (> (move-to-column lm force) lm)
+		 ;; If lm is in a tab and we are not forcing, move before tab
+		 (backward-char 1)))
+	    ((and force (< cc lm))
+	     (indent-to-left-margin))))))
 
 ;; This used to be the default indent-line-function,
 ;; used in Fundamental Mode, Text Mode, etc.