]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/multishell/multishell-list.el
Fix some quoting problems in doc strings
[gnu-emacs-elpa] / packages / multishell / multishell-list.el
index f3895e2201f2ef9491aa3e8a982c79944a1af16d..93004943a4383f3491e01b69b49680feca8f514a 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2016 Free Software Foundation, Inc. and Ken Manheimer
 
 ;; Author: Ken Manheimer <ken.manheimer@gmail.com>
-;; Version: 1.1.4
+;; Version: 1.1.5
 ;; Created: 2016 -- first public availability
 ;; Keywords: processes
 ;; URL: https://github.com/kenmanheimer/EmacsMultishell
@@ -231,9 +231,9 @@ Provide for concluding minibuffer interaction if we're in completing mode."
 
 Initial sort is from most to least recently used:
 
-- First active shells, flagged with '+' a plus sign
-- Then, inactive shells, flagged with '.' a period
-- Then historical shells that currently have no buffer, flagged with 'x' an ex
+- First active shells, flagged with `+' a plus sign
+- Then, inactive shells, flagged with `.' a period
+- Then historical shells that currently have no buffer, flagged with `x' an ex
 
 \\{multishell-list-mode-map\}"
   (setq tabulated-list-format
@@ -252,15 +252,18 @@ Initial sort is from most to least recently used:
 
 For duplicates, we prefer the ones that have paths."
   (let ((tally (make-hash-table :test #'equal))
-        got name already)
+        got name name-order-reversed already)
     (mapcar #'(lambda (entry)
                 (setq name (multishell-name-from-entry entry)
                       already (gethash name tally nil))
+                (when (not already)
+                  (push name name-order-reversed))
                 (when (or (not already) (< (length already) (length entry)))
                   ;; Add new or replace shorter prior entry for name:
                   (puthash name entry tally)))
             entries)
-    (maphash #'(lambda (key value) (push value got)) tally)
+    (dolist (name name-order-reversed)
+      (push (gethash name tally) got))
     got))
 
 ;;;###autoload
@@ -268,7 +271,7 @@ For duplicates, we prefer the ones that have paths."
   "Edit your current and historic list of shell buffers.
 
 If optional COMPLETING is nil, we present the full
-`multishell-history' list in a popped buffer named '*Shells*'.
+`multishell-history' list in a popped buffer named `*Shells*'.
 
 In the buffer, hit ? or h for a list of commands.