From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: 23.0.60; Segmentation fault loading auto-lang.el Date: Wed, 09 Apr 2008 11:19:43 +0900 Message-ID: References: <87r6dg3oe2.fsf@stupidchicken.com> <87skxwl29o.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1207707652 6558 80.91.229.12 (9 Apr 2008 02:20:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2008 02:20:52 +0000 (UTC) Cc: intrigeri@boum.org, 103@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 09 04:21:24 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JjPwB-0001m3-39 for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2008 04:21:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjPvX-0000s1-IY for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 22:20:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjPvT-0000r6-Vf for emacs-devel@gnu.org; Tue, 08 Apr 2008 22:20:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjPvT-0000qH-DB for emacs-devel@gnu.org; Tue, 08 Apr 2008 22:20:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjPvT-0000py-0W for emacs-devel@gnu.org; Tue, 08 Apr 2008 22:20:39 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjPuy-0002Di-N9 for emacs-devel@gnu.org; Tue, 08 Apr 2008 22:20:39 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id m392Jo7b026403; Wed, 9 Apr 2008 11:19:51 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id m392JmkP011950; Wed, 9 Apr 2008 11:19:48 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id m392JhUL019012; Wed, 9 Apr 2008 11:19:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1JjPuZ-00052G-Fw; Wed, 09 Apr 2008 11:19:43 +0900 In-reply-to: <87skxwl29o.fsf@stupidchicken.com> (message from Chong Yidong on Tue, 08 Apr 2008 12:50:11 -0400) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94748 Archived-At: In article <87skxwl29o.fsf@stupidchicken.com>, Chong Yidong writes: > > Any Lisp program that depends on the result of > > string-as-unibyte (thus Emacs' internal character > > representation) won't work in Emacs 23. > I see. However, maybe the following change to regexp-opt-group in > regexp-opt.el would make things a little more predictable. What do you > think? I agree because that change will avoid a unibyte string being changed to multibyte by accident. But, I've just downloaded auto-lang.el and found that it has codes something like this: (string-as-multibyte (regexp-opt (mapcar 'string-as-unibyte (append al-german-common-words al-german-8bit-words nil)))) All of them should be changed to this simple form: (regexp-opt (append al-german-common-words al-german-8bit-words)) The above german case works just by chance, but al-danish-common-words doesn't. You'll see peculiar 8-bit codes in it. And, the file should have a coding tag. --- Kenichi Handa handa@ni.aist.go.jp > *** trunk/lisp/emacs-lisp/regexp-opt.el.~1.37.~ 2008-03-14 17:17:34.000000000 -0400 > --- trunk/lisp/emacs-lisp/regexp-opt.el 2008-04-08 12:46:49.000000000 -0400 > *************** > *** 226,232 **** > ;; Otherwise, divide the list into those that start with a > ;; particular letter and those that do not, and recurse on them. > ! (let* ((char (char-to-string (string-to-char (car strings)))) > (half1 (all-completions char strings)) > (half2 (nthcdr (length half1) strings))) > (concat open-group > --- 226,232 ---- > ;; Otherwise, divide the list into those that start with a > ;; particular letter and those that do not, and recurse on them. > ! (let* ((char (substring (car strings) 0 1)) > (half1 (all-completions char strings)) > (half2 (nthcdr (length half1) strings))) > (concat open-group