From 73c77a1be3ebd7eafd9444f2faa1e2d88b9d80b2 Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 27 Dec 2001 03:29:37 +0000 Subject: [PATCH] * elmo-nmz.el (elmo-nmz-use-drive-letter): New variable. (elmo-map-folder-list-message-locations): Do drive letter conversion on Windows environment. --- elmo/ChangeLog | 6 ++++++ elmo/elmo-nmz.el | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index fe2750f..b42ddc8 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2001-12-27 Yuuichi Teranishi + + * elmo-nmz.el (elmo-nmz-use-drive-letter): New variable. + (elmo-map-folder-list-message-locations): Do drive letter conversion + on Windows environment. + 2001-12-27 Kenichi OKADA * elmo-nntp.el (elmo-nntp-read-response): Fixed for Response '400' diff --git a/elmo/elmo-nmz.el b/elmo/elmo-nmz.el index 5fb36b9..1d74132 100644 --- a/elmo/elmo-nmz.el +++ b/elmo/elmo-nmz.el @@ -60,6 +60,10 @@ If the value is a list, all elements are used as index paths for namazu." (repeat (directory :tag "Index Path"))))) :group 'elmo) +(defvar elmo-nmz-use-drive-letter (if (memq system-type + '(OS/2 emx windows-nt)) t nil) + "*If non-nil, do a drive letter conversion (e.g. /a|/ => a:/).") + ;;; "namazu search" (eval-and-compile (luna-define-class elmo-nmz-folder @@ -234,7 +238,14 @@ If the value is a list, all elements are used as index paths for namazu." (goto-char (point-min)) (while (not (eobp)) (beginning-of-line) - (setq bol (if (looking-at "^file://") (match-end 0)(point))) + ;; convert url to file path. + (when (looking-at "^file://") + (replace-match "")) + (when (and elmo-nmz-use-drive-letter + (looking-at "^/\\([A-Za-z]\\)|/")) + (replace-match "\\1:/") + (beginning-of-line)) + (setq bol (point)) (end-of-line) (setq locations (cons (buffer-substring bol (point)) locations)) (forward-line 1)) -- 1.7.10.4