X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-util.el;h=30f0740521033d0e8cb4e2652db43ba72160242c;hb=000345eadd81debeb1527fb65e46109c96fc35e0;hp=13576d451737ea6079ea4f221cc8f933d1607cbc;hpb=e68fd9084cb93ed29625ed700a1a77cd86ecc335;p=elisp%2Fwanderlust.git diff --git a/wl/wl-util.el b/wl/wl-util.el index 13576d4..30f0740 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -667,7 +667,7 @@ that `read' can handle, whenever this is possible." (defvar wl-load-profile-function 'wl-local-load-profile) (defun wl-local-load-profile () "Load `wl-init-file'." - (message "Initializing ...") + (message "Initializing...") (load wl-init-file 'noerror 'nomessage)) (defun wl-load-profile () @@ -846,7 +846,7 @@ This function is imported from Emacs 20.7." (defun wl-biff-check-folder (folder) (if (eq (elmo-folder-type-internal folder) 'pop3) - (unless (elmo-pop3-get-session folder 'if-exists) + (unless (elmo-pop3-get-session folder 'any-exists) (wl-folder-check-one-entity (elmo-folder-name-internal folder) 'biff)) (wl-folder-check-one-entity (elmo-folder-name-internal folder) @@ -897,38 +897,13 @@ 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) + +(defun wl-region-exists-p () + "Return non-nil if a region exists on current buffer." + (static-if (featurep 'xemacs) + (and zmacs-regions zmacs-region-active-p) + (and transient-mark-mode mark-active))) (defvar wl-line-string) (defun wl-line-parse-format (format spec-alist)