Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
In article <[EMAIL PROTECTED]>, Zhang Wei <[EMAIL PROTECTED]> writes: > The `kinsoku' processing works great now, but `nospace-between-words' > still doesn't work for: > (set-language-environment "UTF-8") and, > (set-language-environment "Chinese-GB18030") > Should we do the same thing to the `nospace-between-words' property? You are right. I've just installed a fix which is slightly different from your patch in the way of initializing the tables. --- Kenichi Handa [EMAIL PROTECTED] ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
Kenichi Handa <[EMAIL PROTECTED]> writes: > That makes too many unnecessary calls of `kinsoku'. I've > just installed a fix of the different way. Could you please > try with the latest code? The `kinsoku' processing works great now, but `nospace-between-words' still doesn't work for: (set-language-environment "UTF-8") and, (set-language-environment "Chinese-GB18030") Should we do the same thing to the `nospace-between-words' property? * local directory is at [EMAIL PROTECTED]/emacs--unicode--0--patch-122 * comparing to [EMAIL PROTECTED]/emacs--unicode--0--patch-122 A lib-src/blessmail A patch.txt M lisp/textmodes/fill.el M lisp/international/characters.el * modified files --- orig/lisp/international/characters.el +++ mod/lisp/international/characters.el @@ -879,16 +879,20 @@ (set-char-table-range auto-fill-chars '(#xFF00 . #xFF9F) t) (set-char-table-range auto-fill-chars '(#x2 . #x2) t) -(let ((l '(katakana-jisx0201 - japanese-jisx0208 japanese-jisx0212 - japanese-jisx0213-1 japanese-jisx0213-2 - chinese-gb2312 chinese-gbk chinese-big5-1 chinese-big5-2 - chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3 - chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6 - chinese-cns11643-7))) - (while l -(put-charset-property (car l) 'nospace-between-words t) -(setq l (cdr l +(defvar nospace-between-words-chars-table + (let ((table (make-char-table nil))) +;; Register `nospace-between-words' for scripts HAN, KANA, +;; BOPOMPFO, and CJK-MISS. +(map-char-table #'(lambda (key val) + (if (memq val '(han kana bopomofo cjk-misc)) + (set-char-table-range table key + 'nospace-between-words))) + char-script-table) +;; Register `nospace-between-words' also for full width characters. +(set-char-table-range table '(#xFF01 . #xFF61) 'nospace-between-words) +(set-char-table-range table '(#xFFE0 . #xFFE6) 'nospace-between-words) +table) + "A char-table for characters with `nospace-between-words' property.") ;; CJK double width characters. --- orig/lisp/textmodes/fill.el +++ mod/lisp/textmodes/fill.el @@ -452,7 +452,7 @@ (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 + ;; at the character. And, character 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. @@ -466,8 +466,7 @@ (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) +(or (aref nospace-between-words-chars-table prev) (get-text-property (1- (match-beginning 0)) 'nospace-between-words))) (delete-char -1)) * added files --- /dev/null +++ /home/brep/emacs-source/emacs--unicode--0/,,[EMAIL PROTECTED]/new-files-archive/./lib-src/blessmail @@ -0,0 +1,3 @@ +#!/bin/sh +chgrp 8 $* && chmod g+s $* +echo mail directory = /var/mail --- /dev/null +++ /home/brep/emacs-source/emacs--unicode--0/,,[EMAIL PROTECTED]/new-files-archive/./patch.txt @@ -0,0 +1,2 @@ +* local directory is at [EMAIL PROTECTED]/emacs--unicode--0--patch-122 +* comparing to [EMAIL PROTECTED]/emacs--unicode--0--patch-122 ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
In article <[EMAIL PROTECTED]>, Zhang Wei <[EMAIL PROTECTED]> writes: > Zhang Wei <[EMAIL PROTECTED]> writes: > > `kinsoku processing' and `nospace-between-words' don't work with > > auto-fill-mode. > It don't work with "UTF-8" and "Chinese-GBK" language environment, but > it work with "Chinese-GB" language envrionment, strange behavior. That's because Han characters are recognized as GBK in Chinese-GBK and as Unicode in UTF-8, but the those charsets were not recognized in fill.el. > Would this patch be useful? That makes too many unnecessary calls of `kinsoku'. I've just installed a fix of the different way. Could you please try with the latest code? --- Kenichi Handa [EMAIL PROTECTED] ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
Zhang Wei <[EMAIL PROTECTED]> writes: > `kinsoku processing' and `nospace-between-words' don't work with > auto-fill-mode. Would this patch be useful? ? patch ? admin/unidata/unidata.txt Index: lisp/international/characters.el === RCS file: /cvsroot/cvs.savannah.gnu.org/emacs/emacs/lisp/international/characters.el,v retrieving revision 1.42.4.18 diff -u -r1.42.4.18 characters.el --- lisp/international/characters.el28 Aug 2006 02:32:19 - 1.42.4.18 +++ lisp/international/characters.el21 Oct 2006 18:09:44 - @@ -869,8 +869,10 @@ ;; Setup auto-fill-chars for charsets that should invoke auto-filling. -;; SPACE and NEWLINE are already set. Also put `nospace-between-words' -;; property on the charsets. +;; SPACE and NEWLINE are already set, put `nospace-between-words' +;; property on the charsets. Also put `fill-find-break-point-function' +;; property to charsets which require special functions to find line +;; breaking point. (set-char-table-range auto-fill-chars '(#x3041 . #x30FF) t) (set-char-table-range auto-fill-chars '(#x3400 . #x4DB5) t) @@ -879,16 +881,31 @@ (set-char-table-range auto-fill-chars '(#xFF00 . #xFF9F) t) (set-char-table-range auto-fill-chars '(#x2 . #x2) t) -(let ((l '(katakana-jisx0201 - japanese-jisx0208 japanese-jisx0212 - japanese-jisx0213-1 japanese-jisx0213-2 - chinese-gb2312 chinese-gbk chinese-big5-1 chinese-big5-2 - chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3 - chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6 - chinese-cns11643-7))) - (while l -(put-charset-property (car l) 'nospace-between-words t) -(setq l (cdr l +(dolist (pair '((katakana-jisx0201 . kinsoku) + (japanese-jisx0208 . kinsoku) + (japanese-jisx0212 . kinsoku) + (japanese-jisx0213-1 . kinsoku) + (japanese-jisx0213-2 . 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) + (chinese-big5-1 . 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) + (unicode . kinsoku))) + (put-charset-property (car pair) 'fill-find-break-point-function (cdr pair)) + (put-charset-property (car pair) 'nospace-between-words t)) ;; CJK double width characters. Index: lisp/textmodes/fill.el === RCS file: /cvsroot/cvs.savannah.gnu.org/emacs/emacs/lisp/textmodes/fill.el,v retrieving revision 1.164.2.16 diff -u -r1.164.2.16 fill.el --- lisp/textmodes/fill.el 14 Sep 2006 09:23:51 - 1.164.2.16 +++ lisp/textmodes/fill.el 21 Oct 2006 18:09:44 - @@ -368,16 +368,6 @@ (looking-at paragraph-start (run-hook-with-args-until-success 'fill-nobreak-predicate) -;; Put `fill-find-break-point-function' property to charsets which -;; require special functions to find line breaking point. -(dolist (pair '((katakana-jisx0201 . kinsoku) - (chinese-gb2312 . kinsoku) - (japanese-jisx0208 . kinsoku) - (japanese-jisx0212 . kinsoku) - (chinese-big5-1 . kinsoku) - (chinese-big5-2 . kinsoku))) - (put-charset-property (car pair) 'fill-find-break-point-function (cdr pair))) - (defun fill-find-break-point (limit) "Move point to a proper line breaking position of the current line. Don't move back past the buffer position LIMIT. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
Zhang Wei <[EMAIL PROTECTED]> writes: > `kinsoku processing' and `nospace-between-words' don't work with > auto-fill-mode. Would this patch be useful? patch Description: test/plain ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
Zhang Wei <[EMAIL PROTECTED]> writes: > `kinsoku processing' and `nospace-between-words' don't work with > auto-fill-mode. It don't work with "UTF-8" and "Chinese-GBK" language environment, but it work with "Chinese-GB" language envrionment, strange behavior. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
emacs-unicode-2: `kinsoku processing' and `nospace-between-words' don't work
`kinsoku processing' and `nospace-between-words' don't work with auto-fill-mode. -- If emacs crashed, and you have the emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.0.0/etc/DEBUG for instructions. In GNU Emacs 23.0.0.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of 2006-10-19 on emacsfans.org X server distributor `The X.Org Foundation', version 11.0.7000 configured using `configure '--with-gtk' '--enable-font-backend' '--with-freetype' '--with-xft' 'CFLAGS=-g'' 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.UTF-8 locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t show-paren-mode: t display-time-mode: t delete-selection-mode: t pc-selection-mode: t auto-image-file-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Recent input: C-x C-b v C-s C-g C-x C-b q v C-s C-s M-y C-a C-s M-y C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s M-x r e p r o t o r t - e m b u Recent messages: Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help Auto-saving...done Updating buffer list...done Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help Quit Updating buffer list...done Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help Mark saved where search started [2 times] Loading emacsbug...done call-interactively: Text is read-only ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug