emacs-devel
[Top][All Lists]
Advanced

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

Re: Longlines and insert


From: Stefan Monnier
Subject: Re: Longlines and insert
Date: Tue, 15 Nov 2005 23:27:19 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> 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.

If the `len' argument to the after-change-function is zero, it means it's
an insert.  Now my suggestion is probably bogus indeed 'cause I know next to
nothing about longlines-mode.  E.g. I'm not sure what you mean by "a legit
soft newline".


        Stefan




reply via email to

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