* lsdb.el (lsdb-wl-show-buffer): New function which respects
authorueno <ueno>
Thu, 2 May 2002 05:27:59 +0000 (05:27 +0000)
committerueno <ueno>
Thu, 2 May 2002 05:27:59 +0000 (05:27 +0000)
lsdb-pop-up-windows.
(lsdb-wl-toggle-buffer): New function.
From Yuuichi Teranishi <teranisi@gohome.org>

* README: Fix setting example.

README
lsdb.el

diff --git a/README b/README
index a8e7ada..2447f6f 100644 (file)
--- 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 (file)
--- 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)