From 0e881cf93b261177d3329e0fe3686f3091a422be Mon Sep 17 00:00:00 2001 From: yoichi Date: Tue, 11 May 2004 15:38:09 +0000 Subject: [PATCH] * wl-folder.el (wl-folder-open-close): Handle blank line. (wl-folder-jump-to-current-entity): Ditto. --- wl/ChangeLog | 5 +++++ wl/wl-folder.el | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index cbcdce5..8de9549 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2004-05-12 Yoichi NAKAYAMA + + * wl-folder.el (wl-folder-open-close): Handle blank line. + (wl-folder-jump-to-current-entity): Ditto. + 2004-05-09 Hiroya Murata * Version number is increased to 2.11.27. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index f0db0ba..7d6e4cb 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -613,19 +613,21 @@ Optional argument ARG is repeart count." (defun wl-folder-jump-to-current-entity (&optional arg) "Enter the current folder. If optional ARG exists, update folder list." (interactive "P") - (beginning-of-line) - (let (entity beg end indent opened fname err fld-name) + (let ((fld-name (wl-folder-get-entity-from-buffer)) + entity beg end indent opened err) + (unless fld-name + (error "No folder")) + (beginning-of-line) (if (and (wl-folder-buffer-group-p) (looking-at wl-folder-group-regexp)) ;; folder group (save-excursion - (setq fname (wl-folder-get-entity-from-buffer)) (setq indent (wl-match-buffer 1)) (setq opened (wl-match-buffer 2)) (if (string= opened "+") (progn (setq entity (wl-folder-search-group-entity-by-name - fname + fld-name wl-folder-entity)) (setq beg (point)) (if arg @@ -645,12 +647,12 @@ Optional argument ARG is repeart count." (wl-highlight-folder-path wl-folder-buffer-cur-path)) ; (quit ; (setq err t) - ; (setcdr (assoc fname wl-folder-group-alist) nil)) + ; (setcdr (assoc fld-name wl-folder-group-alist) nil)) ; (error ; (elmo-display-error errobj t) ; (ding) ; (setq err t) - ; (setcdr (assoc fname wl-folder-group-alist) nil))) + ; (setcdr (assoc fld-name wl-folder-group-alist) nil))) (if (not err) (let ((buffer-read-only nil)) (delete-region (save-excursion (beginning-of-line) @@ -665,7 +667,7 @@ Optional argument ARG is repeart count." (beginning-of-line) (point)))) (setq entity (wl-folder-search-group-entity-by-name - fname + fld-name wl-folder-entity)) (let ((buffer-read-only nil)) (delete-region beg end)) @@ -677,7 +679,6 @@ Optional argument ARG is repeart count." ; (wl-highlight-folder-current-line) )) ;; ordinal folder - (setq fld-name (wl-folder-get-entity-from-buffer)) (wl-folder-set-current-entity-id (get-text-property (point) 'wl-folder-entity-id)) (setq fld-name (wl-folder-get-folder-name-by-id @@ -2584,6 +2585,8 @@ Use `wl-subscribed-mailing-list'." (defun wl-folder-open-close () "Open or close parent entity." (interactive) + (unless (wl-folder-get-entity-from-buffer) + (error "No folder")) (save-excursion (beginning-of-line) (if (wl-folder-buffer-group-p) -- 1.7.10.4