changeset 37258:d74967dafcb7

(miscdic-convert): For MS-DOS, if long file names aren't supported, truncate the file names in quail-misc-package-ext-info to 8+3 before matching them against FILENAME.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 06 Apr 2001 19:04:14 +0000
parents 6bbf8e77d787
children 1af46ff37380
files lisp/international/titdic-cnv.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/titdic-cnv.el	Fri Apr 06 19:03:00 2001 +0000
+++ b/lisp/international/titdic-cnv.el	Fri Apr 06 19:04:14 2001 +0000
@@ -976,7 +976,15 @@
 	name title dicfile coding quailfile converter copyright
 	dicbuf)
     (while tail
-      (when (string-match (nth 2 (car tail)) filename)
+      (when (or (string-match (nth 2 (car tail)) filename)
+		;; MS-DOS filesystem truncates file names to 8+3
+		;; limits, so "cangjie-table.cns" becomes
+		;; "cangjie-.cns", and the above string-match fails.
+		;; Give DOS users a chance...
+		(and (fboundp 'msdos-long-file-names)
+		     (not (msdos-long-file-names))
+		     (string-match (dos-truncate-to-8+3 (nth 2 (car tail)))
+				   filename)))
 	(setq slot (car tail)
 	      name (car slot)
 	      title (nth 1 slot)