emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filling in the minibuffer


From: Alex Schroeder
Subject: Re: filling in the minibuffer
Date: Sat, 21 Aug 2004 14:08:18 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Maybe move-to-left-margin should stop at field boundaries?  I'm not
>     sure this is the correct solution...
>
> It would make sense for move-to-left-margin to special-case
> the minibuffer and treat the end of the prompt as the left margin.
>
> Does this patch give good results?

It does.  Thanks.

Alex.


> *** indent.el 11 Sep 2003 09:45:48 -0400      1.55
> --- indent.el 17 Aug 2004 20:27:18 -0400      
> ***************
> *** 164,177 ****
>     (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)))))
>   
>   ;; This used to be the default indent-line-function,
>   ;; used in Fundamental Mode, Text Mode, etc.
> --- 164,181 ----
>     (interactive (list (prefix-numeric-value current-prefix-arg) t))
>     (beginning-of-line n)
>     (skip-chars-forward " \t")
> !   (if (window-minibuffer-p)
> !       (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.
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]