From: ueno Date: Thu, 2 May 2002 05:27:59 +0000 (+0000) Subject: * lsdb.el (lsdb-wl-show-buffer): New function which respects X-Git-Tag: lsdb-0_6~9 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3d5336ec4ef7e946c076630b84ff6d99ee3430;p=elisp%2Flsdb.git * lsdb.el (lsdb-wl-show-buffer): New function which respects lsdb-pop-up-windows. (lsdb-wl-toggle-buffer): New function. From Yuuichi Teranishi * README: Fix setting example. --- diff --git a/README b/README index a8e7ada..2447f6f 100644 --- a/README +++ b/README @@ -74,7 +74,7 @@ If you use Wanderlust, put the following lines into your ~/.wl: (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name))) (add-hook 'wl-summary-mode-hook (lambda () - (define-key wl-summary-mode-map ":" 'lsdb-toggle-buffer))) + (define-key wl-summary-mode-map ":" 'lsdb-wl-toggle-buffer))) If you use Mew, put the following lines into your ~/.mew: (autoload 'lsdb-mew-insinuate "lsdb") diff --git a/lsdb.el b/lsdb.el index cadbe52..7d049a9 100644 --- a/lsdb.el +++ b/lsdb.el @@ -43,7 +43,7 @@ ;;; (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name))) ;;; (add-hook 'wl-summary-mode-hook ;;; (lambda () -;;; (define-key wl-summary-mode-map ":" 'lsdb-toggle-buffer))) +;;; (define-key wl-summary-mode-map ":" 'lsdb-wl-toggle-buffer))) ;;; For Mew, put the following lines into your ~/.mew: ;;; (autoload 'lsdb-mew-insinuate "lsdb") @@ -1290,7 +1290,7 @@ of the buffer." (add-hook 'wl-summary-toggle-disp-folder-on-hook 'lsdb-hide-buffer) (add-hook 'wl-summary-toggle-disp-folder-off-hook 'lsdb-hide-buffer) (add-hook 'wl-summary-toggle-disp-folder-message-resumed-hook - 'lsdb-show-buffer) + 'lsdb-wl-show-buffer) (add-hook 'wl-exit-hook 'lsdb-mode-save) (add-hook 'wl-save-hook 'lsdb-mode-save)) @@ -1305,6 +1305,24 @@ of the buffer." #'lsdb-wl-temp-buffer-show-function)) (lsdb-display-record (car records))))))) +(defun lsdb-wl-toggle-buffer (&optional arg) + "Toggle hiding of the LSDB window for Wanderlust. +If given a negative prefix, always show; if given a positive prefix, +always hide." + (interactive + (list (if current-prefix-arg + (prefix-numeric-value current-prefix-arg) + 0))) + (let ((lsdb-temp-buffer-show-function + #'lsdb-wl-temp-buffer-show-function)) + (lsdb-toggle-buffer arg))) + +(defun lsdb-wl-show-buffer () + (when lsdb-pop-up-windows + (let ((lsdb-temp-buffer-show-function + #'lsdb-wl-temp-buffer-show-function)) + (lsdb-show-buffer)))) + (defvar wl-current-summary-buffer) (defvar wl-message-buffer) (defun lsdb-wl-temp-buffer-show-function (buffer)