Subject: pkg/18605: mule-ucs makes emacs21 load slowly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hackerb9@wongs.ne>
List: netbsd-bugs
Date: 10/09/2002 15:50:28
>Number:         18605
>Category:       pkg
>Synopsis:       mule-ucs makes emacs 21.2 load slowly
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 09 15:51:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Charlie Root
>Release:        NetBSD 1.6
>Organization:
	
>Environment:
	
	
System: NetBSD muhaqqaq 1.6 NetBSD 1.6 (DAVIDWONG) #1: Sun Sep 29 05:35:30 PDT 2002 root@laptop.davidwong.com:/usr/src/sys/arch/i386/compile/DAVIDWONG i386
Architecture: i386
Machine: i386
>Description:

The editors/mule-ucs package makes emacs 21.2 load unbearably slowly
when unicode support is turned on in the standard way.

>How-To-Repeat:

cd editors/mule-ucs
make install && make clean
echo "(require 'un-define)" >> ~/.emacs
emacs

>Fix:

Assumedly this problem will be fixed by either the next update of
mule-ucs or emacs21. In the meantime here's a patch from

    http://tsukuba.m17n.org/mule-archive/2002-3/msg00000.html

Just put the following into editors/mule-ucs/patches/patch-aa


$NetBSD$

--- lisp/un-define.el.orig	Tue Mar  6 14:41:38 2001
+++ lisp/un-define.el
@@ -610,13 +610,21 @@ by calling post-read-conversion and pre-
 
  (mapcar
   (lambda (x)
-    (mapcar
-     (lambda (y)
-       (mucs-define-coding-system
-	(nth 0 y) (nth 1 y) (nth 2 y)
-	(nth 3 y) (nth 4 y) (nth 5 y) (nth 6 y))
-       (coding-system-put (car y) 'alias-coding-systems (list (car x))))
-     (cdr x)))
+    (if (fboundp 'register-char-codings)
+	;; Mule 5, where we don't need the eol-type specified and
+	;; register-char-codings may be very slow for these coding
+	;; system definitions.
+	(let ((y (cadr x)))
+	  (mucs-define-coding-system
+	   (car x) (nth 1 y) (nth 2 y)
+	   (nth 3 y) (nth 4 y) (nth 5 y)))
+      (mapcar
+       (lambda (y)
+	 (mucs-define-coding-system
+	  (nth 0 y) (nth 1 y) (nth 2 y)
+	  (nth 3 y) (nth 4 y) (nth 5 y) (nth 6 y))
+	 (coding-system-put (car y) 'alias-coding-systems (list (car x)))))
+      (cdr x)))
   `((utf-8
      (utf-8-unix
       ?u "UTF-8 coding system"
>Release-Note:
>Audit-Trail:
>Unformatted: