From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: C-p on second line in shell-mode moves to beginning of buffer Date: Mon, 17 Oct 2005 00:33:32 -0400 Message-ID: References: <43456064.4090505@gmx.de> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1129523711 30785 80.91.229.2 (17 Oct 2005 04:35:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2005 04:35:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 17 06:35:03 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ERMhZ-0006E9-Hg for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2005 06:34:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERMhY-0006dy-Ne for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2005 00:34:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ERMgn-0006OI-Tw for emacs-devel@gnu.org; Mon, 17 Oct 2005 00:33:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ERMgn-0006Nw-5C for emacs-devel@gnu.org; Mon, 17 Oct 2005 00:33:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERMgn-0006Nt-0M for emacs-devel@gnu.org; Mon, 17 Oct 2005 00:33:33 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ERMgn-0007Om-5Q for emacs-devel@gnu.org; Mon, 17 Oct 2005 00:33:33 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1ERMgm-0000B7-9V; Mon, 17 Oct 2005 00:33:32 -0400 Original-To: Sven Joachim In-reply-to: <43456064.4090505@gmx.de> (message from Sven Joachim on Thu, 06 Oct 2005 19:35:32 +0200) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44157 Archived-At: In shell-mode, when point is on the second line (no matter which column), C-p (`previous-line') moves point to the beginning of the buffer. How comes that? Does this patch give good results? *** simple.el 16 Oct 2005 10:41:23 -0400 1.755 --- simple.el 17 Oct 2005 00:17:41 -0400 *************** *** 3541,3550 **** ;; Compute the end of the line ;; ignoring effectively invisible newlines. (save-excursion ! (end-of-line) (while (and (not (eobp)) (line-move-invisible-p (point))) (goto-char (next-char-property-change (point))) ! (end-of-line)) (point)))) ;; Move to the desired column. --- 3541,3551 ---- ;; Compute the end of the line ;; ignoring effectively invisible newlines. (save-excursion ! ;; Like end-of-line but ignores fields. ! (skip-chars-forward "^\n") (while (and (not (eobp)) (line-move-invisible-p (point))) (goto-char (next-char-property-change (point))) ! (skip-chars-forward "^\n")) (point)))) ;; Move to the desired column.