aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimen Heggestøyl2020-05-17 08:49:08 +0200
committerSimen Heggestøyl2020-05-26 17:41:24 +0200
commitc6e80fdb65ca425d4826f48c348cfd9e30f8eb9b (patch)
tree9c5ef21560882ed8ff000bdd96116edeb3acf09b
parentc6f56bd279bf466450fe9174b3b09201c844eca1 (diff)
downloademacs-c6e80fdb65ca425d4826f48c348cfd9e30f8eb9b.tar.gz
emacs-c6e80fdb65ca425d4826f48c348cfd9e30f8eb9b.zip
Simplify 'project--keymap-prompt' a bit
* lisp/progmodes/project.el: Remove seq requirement. (project--keymap-prompt): Simplify with 'mapconcat'.
-rw-r--r--lisp/progmodes/project.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a00bb703814..7f765e628eb 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -93,7 +93,6 @@
93;;; Code: 93;;; Code:
94 94
95(require 'cl-generic) 95(require 'cl-generic)
96(require 'seq)
97(eval-when-compile (require 'subr-x)) 96(eval-when-compile (require 'subr-x))
98 97
99(defvar project-find-functions (list #'project-try-vc) 98(defvar project-find-functions (list #'project-try-vc)
@@ -808,13 +807,13 @@ the choice in the dispatch menu.")
808 807
809(defun project--keymap-prompt () 808(defun project--keymap-prompt ()
810 "Return a prompt for the project swithing dispatch menu." 809 "Return a prompt for the project swithing dispatch menu."
811 (string-trim 810 (mapconcat
812 (seq-mapcat 811 (pcase-lambda (`(,key ,label))
813 (pcase-lambda (`(,key ,label)) 812 (format "[%s] %s"
814 (format "[%s] %s " 813 (propertize (key-description `(,key)) 'face 'bold)
815 (propertize (key-description `(,key)) 'face 'bold) 814 label))
816 label)) 815 project-switch-menu
817 project-switch-menu 'string))) 816 " "))
818 817
819;;;###autoload 818;;;###autoload
820(defun project-switch-project () 819(defun project-switch-project ()