From: Eshel Yaron Date: Sat, 3 Sep 2022 06:44:42 +0000 (+0300) Subject: ADDED: global keymap sweep-prefix-map, not bound by default X-Git-Tag: v0.2.0~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43e5cdaf91fc40c4c7bc33d6b2625643c391b97b;p=sweep.git ADDED: global keymap sweep-prefix-map, not bound by default --- 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)))