bongo-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-patches] Make `bongo-switch-buffers' behave better when used from


From: Daniel Brockman
Subject: [bongo-patches] Make `bongo-switch-buffers' behave better when used from outside Bongo
Date: Mon, 08 Jan 2007 10:58:51 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

In Savannah task #6317, Daniel Jensen writes:

> What about binding [mode-line mouse-3] in button maps to
> `bongo-switch-buffers'?  This could be a handy, though
> obscure feature, if an extra button is too much.

Mon Jan  8 10:56:46 CET 2007  Daniel Brockman <address@hidden>

 * Make `bongo-switch-buffers' behave better when used from
   outside Bongo.

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-01-08 10:57:36.000000000 +0100
+++ new-bongo/bongo.el  2007-01-08 10:57:36.000000000 +0100
@@ -8,7 +8,7 @@
 ;; Author: Daniel Brockman <address@hidden>
 ;; URL: http://www.brockman.se/software/bongo/
 ;; Created: September 3, 2005
-;; Updated: January 7, 2007
+;; Updated: January 8, 2007
 
 ;; This file is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -7776,16 +7776,15 @@
 If prefix argument OTHER-WINDOW is non-nil, display the other buffer
 in another window."
   (interactive "P")
-  (with-bongo-buffer
-    (let* ((buffer (if (bongo-library-buffer-p)
-                       (bongo-playlist-buffer)
-                    (bongo-library-buffer)))
-           (window (get-buffer-window buffer)))
-      (if window
-          (select-window window)
-        (if other-window
-            (pop-to-buffer buffer)
-          (switch-to-buffer buffer))))))
+  (let* ((buffer (if (bongo-playlist-buffer-p)
+                     (bongo-library-buffer)
+                   (bongo-playlist-buffer)))
+         (window (get-buffer-window buffer)))
+    (if window
+        (select-window window)
+      (if other-window
+          (pop-to-buffer buffer)
+        (switch-to-buffer buffer)))))
 
 (defun bongo ()
   "Switch to a Bongo buffer.
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]