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


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to