Subject: 28.0.50; [PATCH]: Add bindings for project.el

From: Theodor Thornhill <[email-masked]>
Date: Tue, 16 Jun 2020 09:49:51 +0000

Hello again!

This patch adds bindings for project.el.

I followed tab-bar's example and added prefix map to subr.el, and added the bindings to bindings.el. I guess these can be removed at any point in time later.

Also, my assignment form and disclaimer is with the fsf-clerk, and has been for a while. I sent an email this morning, hoping to speed up the process.

Theo

diff --git a/lisp/bindings.el b/lisp/bindings.el
index e3fc5637fa..52890d1896 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1394,6 +1394,18 @@ ctl-x-4-map
 (define-key special-event-map [sigusr1] 'ignore)
 (define-key special-event-map [sigusr2] 'ignore)
 
+;; project.el commands
+(define-key project-prefix-map "f" 'project-find-file)
+(define-key project-prefix-map "b" 'project-switch-to-buffer)
+(define-key project-prefix-map "s" 'project-shell)
+(define-key project-prefix-map "d" 'project-dired)
+(define-key project-prefix-map "v" 'project-vc-dir)
+(define-key project-prefix-map "c" 'project-compile)
+(define-key project-prefix-map "e" 'project-eshell)
+(define-key project-prefix-map "p" 'project-switch-project)
+(define-key project-prefix-map "g" 'project-find-regexp)
+(define-key project-prefix-map "r" 'project-query-replace-regexp)
+
 ;; Don't look for autoload cookies in this file.
 ;; Local Variables:
 ;; no-update-autoloads: t
diff --git a/lisp/subr.el b/lisp/subr.el
index 10c37e9413..75da1be8de 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1265,6 +1265,10 @@ tab-prefix-map
   "Keymap for tab-bar related commands.")
 (define-key ctl-x-map "t" tab-prefix-map)
 
+(defvar project-prefix-map (make-sparse-keymap)
+  "Keymap for project commands.")
+(define-key ctl-x-map "p" project-prefix-map)
+
 
 ;;;; Event manipulation functions.