(newline 1) not equal to (insert "\n") longlines.el
Uwe Brauer
oub
Mon Nov 27 11:26:52 EST 2006
>>>>> " " == Aidan Kehoe <kehoea at parhasard.net> writes:
>>
>> Can somebody please tell me what is the difference between the 2 ways
>> of inserting a newline.
> We don?t ship longlines.el and the same thing happens with GNU
> Emacs, so future questions on its behaviour would probably be
> more usefully addressed to the package?s authors.
I was not sure whether may be newline was implemented differently in
both maces
> The difference
> is, from the docstring of ?newline?:
> The newline is marked with the text-property `hard'. With
> optional arg N, insert that many newlines. In Auto Fill
> mode, if no numeric arg, break the preceding line if it's
> long."
> and indeed (progn (insert "\n") (put-text-property (1- (point))
> (point) 'hard 't)) successfully inserts a newline.
Yeah I thought it had to do with hard via soft. But before I used
(insert "\n") I executed
use-hard-newlines
thinking this would be enough. I see I should have used
put-text-property. That did not occur to me.
Thanks
Uwe
More information about the XEmacs-Beta
mailing list