[Mew-dist 05934] Re: b54
SAKAI Kiyotaka
ksakai at example.com
1998年 8月 17日 (月) 10:35:09 JST
>> In article <19980816101533L.niioka at example.com>, Kenichi Niioka (新岡賢一) <niioka at example.com> writes:
> niioka-hoge: niioka at example.com
> niioka.hoge: niioka at example.com
> の補完がそれぞれ効かなくなりました。
この修正と、"< filename" でファイルの include ができるようにするための
パッチです。
--
酒井 清隆 (E-mail: ksakai at example.com)
-------------- next part --------------
===================================================================
RCS file: RCS/mew.el,v
retrieving revision 1.1
diff -u -r1.1 mew.el
--- mew.el 1998/08/17 00:41:06 1.1
+++ mew.el 1998/08/17 01:27:34
@@ -239,17 +239,27 @@
(setq mew-alias-alist (mew-alias-make-alist)))
(defun mew-alias-make-alist ()
- "Make alias alist with association of (alias . expantion) from
-IM \"imali\" command. Currently, only \"user: user at example.com\" syntax
-is supported."
+ "Make alias alist with association of (alias . expantion).
+Currently, only \"user: user at example.com\" syntax is supported."
(if (and mew-alias-file (file-readable-p mew-alias-file))
(save-excursion
(let ((case-fold-search t)
(alias nil)
(expn nil)
- (alist nil))
+ (alist nil)
+ (files (list mew-alias-file)))
(mew-set-buffer-tmp)
(insert-file-contents mew-alias-file)
+ ;; include alias files
+ (goto-char (point-min))
+ (while (re-search-forward "^\<[ \t]*\\([^ \t\n]+\\).*$" nil t)
+ (let ((file (expand-file-name (mew-match 1))))
+ (delete-region (match-beginning 0) (match-end 0))
+ (if (and (file-readable-p file)
+ (not (mew-member file files)))
+ (progn
+ (insert-file-contents file)
+ (setq files (cons file files))))))
;; remove commets
(goto-char (point-min))
(while (re-search-forward "[;#].*$" nil t)
@@ -270,7 +280,7 @@
(replace-match " "))
;;
(goto-char (point-min))
- (while (re-search-forward "^\\([a-zA-Z0-9-_]+\\): \\(.*\\)$" nil t)
+ (while (re-search-forward "^\\([^ \t\n:]+\\): \\(.*\\)$" nil t)
(setq alias (mew-match 1)
expn (mew-match 2))
;; append for first assoc comes first
Mew-dist メーリングリストの案内