emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2f231fc 1/3: Add global bindings for project commands


From: Dmitry Gutov
Subject: master 2f231fc 1/3: Add global bindings for project commands
Date: Wed, 17 Jun 2020 19:12:14 -0400 (EDT)

branch: master
commit 2f231fcfb763626b8a4ede7da0f80da14a122ca9
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Add global bindings for project commands
    
    * lisp/progmodes/project.el
    (project-prefix-map): New variable.
    Add the new keymap to ctl-x-map.
---
 lisp/progmodes/project.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 1c1891f..14aafdf 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -490,6 +490,23 @@ DIRS must contain directory names."
   ;; Sidestep the issue of expanded/abbreviated file names here.
   (cl-set-difference files dirs :test #'file-in-directory-p))
 
+;;;###autoload
+(defvar project-prefix-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "f" 'project-find-file)
+    (define-key map "s" 'project-shell)
+    (define-key map "d" 'project-dired)
+    (define-key map "v" 'project-vc-dir)
+    (define-key map "c" 'project-compile)
+    (define-key map "e" 'project-eshell)
+    (define-key map "p" 'project-switch-project)
+    (define-key map "g" 'project-find-regexp)
+    (define-key map "r" 'project-query-replace-regexp)
+    map)
+  "Keymap for project commands.")
+
+;;;###autoload (define-key ctl-x-map "p" project-prefix-map)
+
 (defun project--value-in-dir (var dir)
   (with-temp-buffer
     (setq default-directory dir)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]