From 43e5cdaf91fc40c4c7bc33d6b2625643c391b97b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 3 Sep 2022 09:44:42 +0300 Subject: [PATCH] ADDED: global keymap sweep-prefix-map, not bound by default --- sweep.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sweep.el b/sweep.el index e5af560..4d53003 100644 --- a/sweep.el +++ b/sweep.el @@ -69,7 +69,7 @@ (defvar sweep-prolog-server-port nil) ;;;###autoload -(defun sweep-module-compile () +(defun sweep--compile-module () "Compile sweep-module." (interactive) (let* ((sweep-directory @@ -97,7 +97,7 @@ (unless (require 'sweep-module nil t) (if (y-or-n-p "Sweep needs `sweep-module' to work. Compile it now? ") (progn - (sweep-module-compile) + (sweep--compile-module) (require 'sweep-module)) (error "Sweep will not work until `sweep-module' is compiled!")))) @@ -579,7 +579,6 @@ module name, F is a functor name and N is its arity." )))) (defun sweep-colourise-query (buffer) - (interactive) (when (buffer-live-p buffer) (with-current-buffer buffer (let* ((beg (cdr comint-last-prompt)) @@ -644,6 +643,16 @@ module name, F is a functor name and N is its arity." (sweep--ensure-module) (when sweep-init-on-load (sweep-init)) +;;;###autoload +(defvar sweep-prefix-map + (let ((map (make-sparse-keymap))) + (define-key map "m" #'sweep-find-module) + (define-key map "p" #'sweep-find-predicate) + (define-key map "t" #'sweep-top-level) + (define-key map "P" #'sweep-pack-install) + map) + "Keymap for `sweep' global commands.") + ;;;; Testing: ;; (add-to-list 'load-path (file-name-directory (buffer-file-name))) -- 2.39.2