From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Longlines and insert Date: Tue, 15 Nov 2005 21:55:54 -0500 Message-ID: <8764qt9u85.fsf@stupidchicken.com> References: <874q6fa1t0.wl%david.wallin@ul.ie> <87hdaebqxb.fsf@stupidchicken.com> <200511152241.20666.pogonyshev@gmx.net> <873blxjysz.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132109900 20336 80.91.229.2 (16 Nov 2005 02:58:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2005 02:58:20 +0000 (UTC) Cc: Kevin Rodgers , emacs-devel@gnu.org, Paul Pogonyshev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 03:58:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EcDSv-0003cJ-T8 for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2005 03:56:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcDSv-0004G4-2A for ged-emacs-devel@m.gmane.org; Tue, 15 Nov 2005 21:56:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EcDSm-0004Fx-IA for emacs-devel@gnu.org; Tue, 15 Nov 2005 21:55:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EcDSm-0004Fl-4t for emacs-devel@gnu.org; Tue, 15 Nov 2005 21:55:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcDSl-0004Fh-QU for emacs-devel@gnu.org; Tue, 15 Nov 2005 21:55:56 -0500 Original-Received: from [18.95.5.42] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EcDSm-0006yK-4B for emacs-devel@gnu.org; Tue, 15 Nov 2005 21:55:56 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 6F3E61E4318; Tue, 15 Nov 2005 21:55:56 -0500 (EST) Original-To: Stefan Monnier In-Reply-To: <873blxjysz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 15 Nov 2005 18:09:01 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.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: , 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:46071 Archived-At: Stefan Monnier writes: > Maybe longlines-mode could provide a variable > "longlines-inserted-LF-are-hard" and then use it in an > after-change-functions hook to mark all inserted LF as hard when that > variable is non-nil. > > I'd guess that the variable should be non-nil by default and only bound to > nil at a few specific spots, hopefully all of them in longlines.el. The problem with using an after-change-function is that the function is only told that the text was changed in a particular region, not what the change was. There is no way to tell whether a soft newline encountered in that region is a legit soft newline, or one produced by an (insert "foo\n") call.