From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.devel Subject: Re: filling in the minibuffer Date: Sat, 21 Aug 2004 14:08:18 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87pt5k66dp.fsf@emacswiki.org> References: <87d61rgvp3.fsf@emacswiki.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1093090174 26797 80.91.224.253 (21 Aug 2004 12:09:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Aug 2004 12:09:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 21 14:09:26 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ByUgY-0000pP-00 for ; Sat, 21 Aug 2004 14:09:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByUku-0000FK-3n for ged-emacs-devel@m.gmane.org; Sat, 21 Aug 2004 08:13:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByUkg-0000Cl-1M for emacs-devel@gnu.org; Sat, 21 Aug 2004 08:13:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByUkc-0000Bh-K2 for emacs-devel@gnu.org; Sat, 21 Aug 2004 08:13:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByUkc-0000AM-Gw for emacs-devel@gnu.org; Sat, 21 Aug 2004 08:13:38 -0400 Original-Received: from [62.2.95.247] (helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1ByUfc-0007i2-3C; Sat, 21 Aug 2004 08:08:30 -0400 Original-Received: from confusibombus (80-218-0-58.dclient.hispeed.ch [80.218.0.58]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with ESMTP id i7LC8IwE022486 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sat, 21 Aug 2004 14:08:19 +0200 Original-Received: from alex by confusibombus with local (Exim 4.34) id 1ByUfS-0000nb-6i; Sat, 21 Aug 2004 14:08:18 +0200 Original-To: rms@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACkElEQVR42s1a0bLsIAgzjv// y7kPd9pVKxKVdk6fzux2C4EAwR6QZBpcQEopIf3Fq3a52Lfh0Mjjk99zcWYBwA2ihEen9jVxfAf/ u0+Y2HQwNoVw4Dx34trRV6NSjiLPmfPt77jwiBxB/3PnZ3B2AGxzHnGu0wcBwAIAyQwZGvQhiFcy YLOFQcSB/MS82n3ec37vykNqRFTX9rVWR2U5+pZNIggll0CUOQN9BDdm1LfBmcZxIEqjL6r2JU/D galaB7Zg4jlY2ulnIx9OR4iMRl38CAFyKaA8jAxE7lNn650VKMULZ/54crqn0YQCJGQliebXkFIK hwqmGm28cgsSjz/hzRCMneQEwMjVoH3gWTtMPgIslJUV5uIluvUEkyzU+gUGQO62e9NuSdZCzNOM fDPC87iCqfE9gHinsIrSL16TPBfrYIeHzqKU90a50jCh54EcrgAUFo5ibzvebgr/I66USQ0CspQp IVSoBQK3WswDDIndIraHxoglqOjM1d044PQvu1NY0EHtqQR/XwJ+PeCs0x2dSlApZVw4MPER23PD 7JekoHxrqTRod/2Gx5nhx5dfAJhqPt7tDMIZxNN/7lOIaparPn7ZQ88drlORC2eLWXowxIq4gHTh VN1BSmsHoxYAbPWDTuGQuuecS+aYQUYpfr0YqPQOuuUk5tApK077+2xfOYP+XyWEIwPcE49lvT9N y2+wU2KylGGp4yxlALcm6fSlmgk62yfSsfNunDl5d6W91MBUoZw679YAJoMMkhijuXdFOL+khaL2 s+g3zy4APQuQvSc/BNAYnkl6E8ivYtEHJXa1dihE3zgnKMdNgN8DiIwgA17NykUMvFDQ+LALvXXI BuBLAHv/DvBmc/0HzR03PqXmLcQAAAAASUVORK5CYII= In-Reply-To: (Richard Stallman's message of "Tue, 17 Aug 2004 21:35:03 -0400") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26369 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26369 Richard Stallman 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. >