]> code.delx.au - gnu-emacs-elpa/commitdiff
multishell - include active shell buffers names along with history entries.
authorKen Manheimer <ken.manheimer@gmail.com>
Fri, 29 Jan 2016 05:47:02 +0000 (00:47 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Fri, 29 Jan 2016 05:47:02 +0000 (00:47 -0500)
The effect is that existing shell buffers will complete as both the bare
names and the name/path forms, while purely history entries will
complete as just the name/path forms. The difference will provide a cue,
a kind of lubrication for completing existing buffers.

multishell.el

index dc979f015e84061b4158bf8449170613356dc3f4..2f4375290ab6c9227596fc4ddf5ed8c6c2b118ce 100644 (file)
@@ -519,10 +519,8 @@ Return the supplied name, if provided, else return nil."
                              (and (buffer-live-p buffer)
                                   (with-current-buffer buffer
                                     ;; Shell mode buffers.
-                                    (derived-mode-p 'shell-mode))
-                                  ;; Allow duplicates, as sign of buffers that
-                                  ;; currently exist vs historical entries.
-                                  ;;(not (multishell-history-entries name))
+                                    (and (derived-mode-p 'shell-mode)
+                                         (comint-check-proc (current-buffer))))
                                   name)))
                          (buffer-list)))
            multishell-history))