emacs-devel
[Top][All Lists]
Advanced

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

Re: Longlines and insert


From: Kevin Rodgers
Subject: Re: Longlines and insert
Date: Tue, 15 Nov 2005 12:00:25 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Chong Yidong wrote:
> The problem is that mail-setup inserts the header fields by calling
>
>   (insert "blahblah\n")
>
> The inserted newlines are not marked as hard, so longlines gets
> confused.
>
> I could fix this by going through sendmail.el and adding (newline) to
> all these places.  But maybe a more wide-reaching solution is called
> for.

How about a less invasive change?  The headers are actually inserted
like this:

(insert header "\n")

Which I think could be fixed like this:

(let ((hard-newline "\n"))
  ;; see set-hard-newline-properties:
  (put-text-property 0 1 'hard t hard-newline)
  (put-text-property 0 1 'rear-nonsticky '(hard) hard-newline)
  ...
  (insert header hard-newline))

--
Kevin Rodgers





reply via email to

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