branch: scratch/rcirc-menu
commit f4a289d98f94c9c0043ae7f405f8d3b285e7bbed
Author: Alex Schroeder <a...@gnu.org>
Commit: Alex Schroeder <a...@gnu.org>

    rcirc-menu.el: guess target when rcirc-target is nil
    
    Use the first part of buffer name instead of just showing no name.
---
 packages/rcirc-menu/rcirc-menu.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/rcirc-menu/rcirc-menu.el 
b/packages/rcirc-menu/rcirc-menu.el
index 0d801ed..a1c9017 100644
--- a/packages/rcirc-menu/rcirc-menu.el
+++ b/packages/rcirc-menu/rcirc-menu.el
@@ -191,7 +191,9 @@ In Rcirc Menu mode, the following commands are defined:
                         (cond ((memq buf hipri) "↑")
                               ((memq buf lopri) "↓")
                               (t " ")) ;; "P"
-                        (or rcirc-target "") ;; "Target"
+                        (or rcirc-target
+                            (car (split-string
+                                  (buffer-name) "@"))) ;; "Target"
                         (with-current-buffer rcirc-server-buffer
                           rcirc-server-name) ;; "Server"
                         (rcirc-menu-activity))) ;; "Activity"

Reply via email to