From 638fecdb6538825d60df1829717249b9646d397e Mon Sep 17 00:00:00 2001 From: teranisi Date: Fri, 12 Jul 2002 00:20:25 +0000 Subject: [PATCH] * wl.el (wl): Don't set wl-init as nil when error occured while auto-checking folders. * wl-util.el (wl-expand-newtext): Re-define as an alias for `elmo-expand-newtext'. * elmo-util.el (elmo-expand-newtext): New function (renamed from wl-expand-newtext). --- elmo/ChangeLog | 5 +++++ elmo/elmo-util.el | 33 +++++++++++++++++++++++++++++++++ wl/ChangeLog | 8 ++++++++ wl/wl-util.el | 33 +-------------------------------- wl/wl.el | 1 - 5 files changed, 47 insertions(+), 33 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 84fc6d1..2fe9221 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2002-07-12 Yuuichi Teranishi + + * elmo-util.el (elmo-expand-newtext): New function (renamed from + wl-expand-newtext). + 2002-06-10 Kenichi Sato * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Fix for diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 7a3b015..86217c3 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1359,6 +1359,39 @@ But if optional argument AUTO is non-nil, DEFAULT is returned." (setq alist (cdr alist))) matches)) +(defun elmo-expand-newtext (newtext original) + (let ((len (length newtext)) + (pos 0) + c expanded beg N did-expand) + (while (< pos len) + (setq beg pos) + (while (and (< pos len) + (not (= (aref newtext pos) ?\\))) + (setq pos (1+ pos))) + (unless (= beg pos) + (push (substring newtext beg pos) expanded)) + (when (< pos len) + ;; We hit a \; expand it. + (setq did-expand t + pos (1+ pos) + c (aref newtext pos)) + (if (not (or (= c ?\&) + (and (>= c ?1) + (<= c ?9)))) + ;; \ followed by some character we don't expand. + (push (char-to-string c) expanded) + ;; \& or \N + (if (= c ?\&) + (setq N 0) + (setq N (- c ?0))) + (when (match-beginning N) + (push (substring original (match-beginning N) (match-end N)) + expanded)))) + (setq pos (1+ pos))) + (if did-expand + (apply (function concat) (nreverse expanded)) + newtext))) + ;;; Folder parser utils. (defun elmo-parse-token (string &optional seps) "Parse atom from STRING using SEPS as a string of separator char list." diff --git a/wl/ChangeLog b/wl/ChangeLog index 51c899d..ed05365 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2002-07-12 Yuuichi Teranishi + + * wl.el (wl): Don't set wl-init as nil when error occured while + auto-checking folders. + + * wl-util.el (wl-expand-newtext): Re-define as an alias for + `elmo-expand-newtext'. + 2002-07-11 Yoichi NAKAYAMA * wl-folder.el (wl-folder-goto-folder-subr): Keep value of diff --git a/wl/wl-util.el b/wl/wl-util.el index 13576d4..259235a 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -897,38 +897,7 @@ is enclosed by at least one regexp grouping construct." (concat open-paren (mapconcat 'regexp-quote strings "\\|") close-paren)))) -(defun wl-expand-newtext (newtext original) - (let ((len (length newtext)) - (pos 0) - c expanded beg N did-expand) - (while (< pos len) - (setq beg pos) - (while (and (< pos len) - (not (= (aref newtext pos) ?\\))) - (setq pos (1+ pos))) - (unless (= beg pos) - (push (substring newtext beg pos) expanded)) - (when (< pos len) - ;; We hit a \; expand it. - (setq did-expand t - pos (1+ pos) - c (aref newtext pos)) - (if (not (or (= c ?\&) - (and (>= c ?1) - (<= c ?9)))) - ;; \ followed by some character we don't expand. - (push (char-to-string c) expanded) - ;; \& or \N - (if (= c ?\&) - (setq N 0) - (setq N (- c ?0))) - (when (match-beginning N) - (push (substring original (match-beginning N) (match-end N)) - expanded)))) - (setq pos (1+ pos))) - (if did-expand - (apply (function concat) (nreverse expanded)) - newtext))) +(defalias 'wl-expand-newtext 'elmo-expand-newtext) (defvar wl-line-string) (defun wl-line-parse-format (format spec-alist) diff --git a/wl/wl.el b/wl/wl.el index 84ed6f4..d2194c4 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -829,7 +829,6 @@ If ARG (prefix argument) is specified, folder checkings are skipped." (error (if (buffer-live-p demo-buf) (kill-buffer demo-buf)) - (setq wl-init nil) (signal (car obj)(cdr obj))) (quit)) (if (buffer-live-p demo-buf) -- 1.7.10.4