[Top][All Lists]

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

Re: require-hard-newlines to use newline

From: Chong Yidong
Subject: Re: require-hard-newlines to use newline
Date: Fri, 11 Mar 2005 21:23:29 -0500 (EST)
User-agent: SquirrelMail/1.4.3a

>> Sorry, I'm probably missing something, but I don't understand how this
>> would work. Since each function would only be modifying their own local
>> STRING variable, not the one that will actually be killed...
> It doesn't have to modify the variable `string', but its string value,
> e.g.
> (defun x (s)
>   (aset s 1 ?-))
> (let ((s "abc"))
>   (x s)
>   s)
> => "a-c"

But this method restricts the possible manipulations to those that keep
the string length unchanged.  That is fine for longlines, which is just
swapping spaces and newlines, but it may not be very useful for other
(hypothetical) purposes.  Even for longlines, aset would be very
inconvenient to use.

reply via email to

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