emacs-pretest-bug
[Top][All Lists]
Advanced

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

auto-fill-mode bug in chinese-gbk coding system [with patchs]


From: Zhang Wei
Subject: auto-fill-mode bug in chinese-gbk coding system [with patchs]
Date: Thu, 31 Mar 2005 23:57:17 +0800

While the coding system is set to chinese-gbk or chinese-gb18030,
auto-fill-mode won't work properly. 

The `nospace-between-words' property does not put on
chinese-gbk/chinese-gb18030 charsets properly to eliminate the "extra
SPACE" problem when refilling. 

And the "fill-find-break-point-function" does not put on
chinese-gbk/chinese-gb18030 charsets properly to make them find line
breaking point properly. 

Here's a patch for "lisp/international/characters.el": 
==================================================== 
--- ../emacs/lisp/international/characters.el   2005-02-27
01:46:21.000000000 +0800 
+++ characters.el       2005-03-31 21:54:44.320347728 +0800 
@@ -864,8 +864,25 @@ 
;; SPACE and NEWLINE are already set.  Also put `nospace-between-words' 
;; property on the charsets. 
(let ((l '(katakana-jisx0201 
-          japanese-jisx0208 japanese-jisx0212 
-          chinese-gb2312 chinese-big5-1 chinese-big5-2))) 
+          japanese-jisx0208 
+          japanese-jisx0212 
+          chinese-gb2312 
+          chinese-gbk 
+          gb18030-2-byte 
+          gb18030-4-byte-bmp 
+          gb18030-4-byte-smp 
+          gb18030-4-byte-ext-1 
+          gb18030-4-byte-ext-2 
+          chinese-big5-1 
+          chinese-big5-2 
+          big5-hkscs 
+          chinese-cns11643-1 
+          chinese-cns11643-2 
+          chinese-cns11643-3 
+          chinese-cns11643-4 
+          chinese-cns11643-5 
+          chinese-cns11643-6 
+          chinese-cns11643-7))) 
  (while l 
    ;;(aset auto-fill-chars (make-char (car l)) t) 
    (put-charset-property (car l) 'nospace-between-words t) 
============================================= 


And here's a patch for "lisp/textmodes/fill.el" 
============================================= 
--- ../emacs/lisp/textmodes/fill.el     2005-02-27 01:46:21.000000000
+0800 
+++ fill.el     2005-03-31 21:50:06.918519216 +0800 
@@ -365,10 +365,24 @@ 
;; require special functions to find line breaking point. 
(dolist (pair '((katakana-jisx0201 . kinsoku) 
               (chinese-gb2312 . kinsoku) 
+               (chinese-gbk . kinsoku) 
+               (gb18030-2-byte . kinsoku) 
+               (gb18030-4-byte-bmp . kinsoku) 
+               (gb18030-4-byte-smp . kinsoku) 
+               (gb18030-4-byte-ext-1 . kinsoku) 
+               (gb18030-4-byte-ext-2 . kinsoku 
               (japanese-jisx0208 . kinsoku) 
               (japanese-jisx0212 . kinsoku) 
               (chinese-big5-1 . kinsoku) 
-               (chinese-big5-2 . kinsoku))) 
+               (chinese-big5-2 . kinsoku) 
+               (big5-hkscs . kinsoku) 
+               (chinese-cns11643-1 . kinsoku) 
+               (chinese-cns11643-2 . kinsoku) 
+               (chinese-cns11643-3 . kinsoku) 
+               (chinese-cns11643-4 . kinsoku) 
+               (chinese-cns11643-5 . kinsoku) 
+               (chinese-cns11643-6 . kinsoku) 
+               (chinese-cns11643-7 . kinsoku))) 
  (put-charset-property (car pair) 'fill-find-break-point-function (cdr
pair))) 

(defun fill-find-break-point (limit) 
============================================== 

The following information is generated automatically by Emacs's
"report-emacs-bug" command: 
========================================================== 
In GNU Emacs 23.0.0.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars) 
of 2005-03-14 on node19, modified by Debian 
Distributor `The XFree86 Project, Inc', version 11.0.40300001 
configured using `configure '--build' 'i386-linux' '--host' 'i386-linux'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes' '--with-gif' '--with-x=yes'
'--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'CFLAGS=-DDEBIAN
-g -O2' 'build_alias=i386-linux' 'host_alias=i386-linux'' 

Important settings: 
 value of $LC_ALL: nil 
 value of $LC_COLLATE: nil 
 value of $LC_CTYPE: nil 
 value of $LC_MESSAGES: nil 
 value of $LC_MONETARY: nil 
 value of $LC_NUMERIC: nil 
 value of $LC_TIME: nil 
 value of $LANG: zh_CN.GBK 
 locale-coding-system: chinese-gbk 
 default-enable-multibyte-characters: t 

--
Zhang Wei
2005-3-31





reply via email to

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