Re: Issues with japanese support

Masayuki Ataka <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
From: Ralf Angeli <[email protected]>
Subject: Re: Issues with japanese support
Date: Tue, 15 Feb 2005 11:19:42 +0100

> >> 4) Is it sufficient to search for \cj or are there other character
> >>    categories which have to be treated the same way?
> >> 
> > At least, it is sufficient for Japanese and not sufficient for 
> > Chinese and Korean.  But I am not a native of Chinese or Korea,
> > so that I can't say space should be gotten rid of when filling
> > in Chinese and Korean like in Japanese.
> >
> > May be \c| is sufficient, but its document says:
> >
> > (category-docstring ?|)
> >  => While filling, we can break a line at this character.
> >
> > That is not equal that no space should be removed.
> > Please negatives of Chinese and Korean give us advices.
> 
> Hm, I just looked at the code doing this newline squashing in CVS
> Emacs and Emacs 21.3:
> 
It looks better for Emacs 21.
But don't you forget our mighty friend, XEmacs?

>   (goto-char from)
>   (if enable-multibyte-characters
>       ;; Delete unnecessay newlines surrounded by words.  The
>       ;; character category `|' means that we can break a line
>       ;; at the character.  And, charset property
>       ;; `nospace-between-words' tells how to concatenate
>       ;; words.  If the value is non-nil, never put spaces
>       ;; between words, thus delete a newline between them.
>       ;; If the value is nil, delete a newline only when a
>       ;; character preceding a newline has text property
>       ;; `nospace-between-words'.
>       (while (search-forward "\n" to t)
> 	(if (get-text-property (match-beginning 0) 'fill-space)
> 	    (replace-match (get-text-property (match-beginning 0) 'fill-space))
> 	  (let ((prev (char-before (match-beginning 0)))
> 		(next (following-char)))
> 	    (if (and (or (aref (char-category-set next) ?|)
> 			 (aref (char-category-set prev) ?|))
> 		     (or (get-charset-property (char-charset prev)
> 					       'nospace-between-words)
> 			 (get-text-property (1- (match-beginning 0))
> 					    'nospace-between-words)))
> 		(delete-char -1))))))

AFAICS, there is no category ?|, no charset-property
'nospace-between-words and no function `char-category-set'
in XEmacs 21.5.18.

---
email: [email protected]
Name:: Masayuki Ataka // (Japan)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.