[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: fill-paragraph puts one useless blank at the end of many Chines
Re: Fwd: fill-paragraph puts one useless blank at the end of many Chinese big5 lines
Tue, 22 Apr 2003 09:43:01 -0400
> >>> fill-paragraph puts one useless blank at the end of many of these
> >>> Chinese big5 lines here in locale zh_TW.Big5 when I set fill-column to
> >>> 16 or 17 etc. I uuencoded the sample input:
> S> It's done on purpose (in fill-newline):
> S> (if (and (= (following-char) ?\ )
> S> (or (aref (char-category-set (preceding-char)) ?|)
> S> (looking-at "[ \t]+\\c|")))
> S> ;; We need one space at end of line so that
> S> ;; further filling won't delete it. NOTE: We
> S> ;; intentionally leave this one space to
> S> ;; distinguish the case that user wants to put
> S> ;; space between \c| characters.
> S> (forward-char 1))
> > Well, whatever... except that I now see them with (setq-default
> > show-trailing-whitespace t) and my thrifty genes say they must go.
> > Plus it's not very environmentally conscious [uses disk space]. And,
> > it may very well have effects beyond what you thought. And, if I must
> > clean it up afterwards, you should do it for me before I see it. And,
> > it looks sloppy.
> Perhaps, by adding some text property to such newlines that
> replaces white spaces between \c| characters, we can avoid
> leaving those spaces.
> Stefan, what do you think? Currently I myself don't have a
> time to work on fill.el (it seems that the file has been
> widely changed since I wrote the above code). Could you
> work on it? Otherwise, I'll put this matter in my TODO list.
It's been reorganized. The way it works is the same, tho.
I'll try coding it up, but do put it on your TODO list, just in case.