Browse Source

Button-ify buffer names in buffer-sets-list

Samuel W. Flint 4 years ago
parent
commit
4a4ccb0d69
1 changed files with 8 additions and 2 deletions
  1. 8 2
      buffer-sets.el

+ 8 - 2
buffer-sets.el

@@ -168,8 +168,14 @@
         (dolist (buffer (symbol-value (buffer-set--generate-buffers-list set)))
           (if (buffer-live-p buffer)
               (if (null (get-buffer-window-list buffer nil t))
-                  (insert (format "    - %s\n" (buffer-name buffer)))
-                (insert (format "    - %s (visible)\n" (buffer-name buffer))))
+                  (progn
+                    (insert "    - ")
+                    (insert-text-button (buffer-name buffer) 'action (eval `(lambda (but) (switch-to-buffer ,buffer))))
+                    (insert "\n"))
+                (progn
+                  (insert "    - ")
+                  (insert-text-button (buffer-name buffer) 'action (eval `(lambda (but) (switch-to-buffer ,buffer))))
+                  (insert "    - %s (visible)\n")))
             ""))))))
 
 ;;;###autoload