I found that having emacs21/site-lisp first in load-path broke
processing of numeric entities, so I looked further.  It seems to me
that this does something more like TRT by actually looking for files
on the load path; I think using load-file-name is a mistake.  The
result seems to find compiled Lisp, schemas and char-name files OK.

[I noticed that the distribution is a year old, but the distribution
site is down, so I can't check for more recent source.]

===================================================================
RCS file: nxml-uchnm.el,v
retrieving revision 1.1
diff -u -r1.1 nxml-uchnm.el
--- nxml-uchnm.el	2005/11/24 19:46:49	1.1
+++ nxml-uchnm.el	2005/11/24 20:09:02
@@ -201,16 +201,21 @@
     mathematical-alphanumeric-symbols)
   "Default value for `nxml-enabled-unicode-blocks'.")
 
-(let ((dir (file-name-directory load-file-name)))
+(let* ((block (car nxml-unicode-blocks))
+       (dir (file-name-directory
+	     (locate-library (format "char-name/unicode/%05X-%05X"
+				     (nth 1 block)
+				     (nth 2 block))))))
+  (dotimes (i 2)
+    (setq dir (file-name-directory (directory-file-name dir))))
   (mapcar (lambda (block)
 	    (let ((sym (nxml-unicode-block-char-name-set (car block))))
 	      (nxml-autoload-char-name-set
 	       sym
-	       (expand-file-name
-		(format "char-name/unicode/%05X-%05X"
-			(nth 1 block)
-			(nth 2 block))
-		dir))))
+	       (expand-file-name (format "char-name/unicode/%05X-%05X"
+					 (nth 1 block)
+					 (nth 2 block))
+				 dir))))
 	  nxml-unicode-blocks))
 
 (defvar nxml-enable-unicode-char-name-sets-flag nil)
===================================================================
RCS file: rng-auto.el,v
retrieving revision 1.1
diff -u -r1.1 rng-auto.el
--- rng-auto.el	2005/11/24 19:45:45	1.1
+++ rng-auto.el	2005/11/24 19:45:50
@@ -54,17 +54,12 @@
 	   (setq Info-default-directory-list
 		 (append Info-default-directory-list (list dir)))))))
 
-(let* ((dir (file-name-directory load-file-name))
-       (schema-dir (concat dir "schema/")))
-  (unless (member dir load-path)
-    (setq load-path (cons dir load-path)))
-  (setq rng-schema-locating-files-default
-	(list "schemas.xml"
-	      (abbreviate-file-name
-	       (expand-file-name "schemas.xml" schema-dir))))
-  (setq rng-schema-locating-file-schema-file
-	(expand-file-name "locate.rnc" schema-dir))
-  (rng-add-info-dir dir))
+(setq rng-schema-locating-files-default
+      (list "schemas.xml"
+	    (abbreviate-file-name  (locate-library "schema/schemas.xml" t))))
+(setq rng-schema-locating-file-schema-file
+      (locate-library "schema/locate.rnc"))
+(rng-add-info-dir (file-name-directory load-file-name))
 
 ;; Users shouldn't edit this.
 ;; Instead they should customize `rng-preferred-prefix-alist'.
===================================================================
RCS file: debian/emacsen-startup,v
retrieving revision 1.1
diff -u -r1.1 debian/emacsen-startup
--- debian/emacsen-startup	2005/11/24 22:37:06	1.1
+++ debian/emacsen-startup	2005/11/24 22:38:47
@@ -15,20 +15,13 @@
     (unload-feature 'un-define)
   (error nil))
 
-(let ((package-dir (concat "/usr/share/"
-                           (symbol-name flavor)
-                           "/site-lisp/nxml-mode")))
-  (when (file-directory-p package-dir)
-        (setq load-path (cons package-dir load-path))))
-
+(debian-pkg-add-load-path-item "/usr/share/emacs/site-lisp/nxml-mode")
 (debian-pkg-add-load-path-item (concat "/usr/share/"
                                        (symbol-name flavor)
                                        "/site-lisp/nxml-mode"))
-(debian-pkg-add-load-path-item "/usr/share/emacs/site-lisp/nxml-mode")
 
-;; Load the package.  Note that we have to load the *source* of rng-auto
-;; for it to properly find the schemas.
-(load "rng-auto.el")
+;; Load the package.
+(load "rng-auto")
  
 ;; Comment this out if you want to use PSGML or another mode to edit
 ;; these files.

Reply via email to