From 4de05b4e04d8ce5fdd0b9151d273a5db8559ca32 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 22 Oct 2002 05:21:00 +0000 Subject: [PATCH] * wl-util.el (wl-region-exists-p): New function. * wl-mime.el (wl-draft-yank-current-message-entity): Use it; Remove defvars for byte-compile warnings. * elmo.el (elmo-generic-folder-diff): Avoid byte-compile warning. --- elmo/ChangeLog | 4 ++++ elmo/elmo.el | 3 +-- wl/ChangeLog | 7 +++++++ wl/wl-mime.el | 15 +++------------ wl/wl-util.el | 6 ++++++ 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 3be2794..7eb435e 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,7 @@ +2002-10-22 Yuuichi Teranishi + + * elmo.el (elmo-generic-folder-diff): Avoid byte-compile warning. + 2002-10-12 Yoichi NAKAYAMA * elmo-dop.el (elmo-folder-status-dop): If spool-folder is absent, diff --git a/elmo/elmo.el b/elmo/elmo.el index d1301a1..a59b76e 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -930,8 +930,7 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).") (if (and in-folder (null in-db)) (cdr in-folder) - (if (null (car in-folder)) - nil)))) + (car in-folder)))) (setq messages (cdr in-folder)) (if (and unsync messages (> unsync messages)) (setq unsync messages)) diff --git a/wl/ChangeLog b/wl/ChangeLog index 8de802c..f92789d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-10-22 Yuuichi Teranishi + + * wl-util.el (wl-region-exists-p): New function. + + * wl-mime.el (wl-draft-yank-current-message-entity): Use it; + Remove defvars for byte-compile warnings. + 2002-10-22 Hiroya Murata * wl-mime.el (toplevel): Fixed last change; use defvar instead of diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 01716ef..19e2fc0 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -34,12 +34,6 @@ (require 'mime-play) (require 'elmo) -;; avoid compile warnings -(defvar zmacs-regions) -(defvar zmacs-region-active-p) -(defvar transient-mark-mode) -(defvar mark-active) - ;;; Draft (defalias 'wl-draft-editor-mode 'mime-edit-mode) @@ -66,12 +60,9 @@ has Non-nil value\)" (set-buffer (wl-current-message-buffer)) (save-restriction (widen) - (if (or (and wl-on-xemacs - zmacs-regions zmacs-region-active-p) - (and (not wl-on-xemacs) - transient-mark-mode mark-active)) - (wl-mime-preview-follow-current-region) - (mime-preview-follow-current-entity))))))) + (if (wl-region-exists-p) + (wl-mime-preview-follow-current-region) + (mime-preview-follow-current-entity))))))) ;; modified mime-preview-follow-current-entity from mime-view.el (defun wl-mime-preview-follow-current-region () diff --git a/wl/wl-util.el b/wl/wl-util.el index 259235a..0230b97 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -899,6 +899,12 @@ is enclosed by at least one regexp grouping construct." (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) "Make a formatter from FORMAT and SPEC-ALIST." -- 1.7.10.4