+2004-05-12 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * wl-folder.el (wl-folder-open-close): Handle blank line.
+ (wl-folder-jump-to-current-entity): Ditto.
+
2004-05-09 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* Version number is increased to 2.11.27.
(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
(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)
(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))
; (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
(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)