]> git.eshelyaron.com Git - sweep.git/commitdiff
PORT: don't rely on defvar-keymap available only since Emacs 29
authorEshel Yaron <me@eshelyaron.com>
Mon, 5 Sep 2022 06:21:44 +0000 (09:21 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 5 Sep 2022 06:21:44 +0000 (09:21 +0300)
sweep.el

index f71c3d4af4af3feebad1298648346a782a222950..578d350e1241de9ec181ae228d6bc5162da2f998 100644 (file)
--- a/sweep.el
+++ b/sweep.el
@@ -74,7 +74,6 @@
 
 (defvar sweep-prolog-server-port nil)
 
-;;;###autoload
 (defun sweep--compile-module ()
   "Compile sweep-module."
   (interactive)
@@ -639,8 +638,7 @@ module name, F is a functor name and N is its arity."
         ("dcg"                 nil)
         ("qq_content"          nil)
         ("qq"                  nil)
-        (other (message "Unknown color term %S" other))
-        ))))
+        (other (message "Unknown color term %S" other))))))
 
 (defun sweep-colourise-buffer (&optional buffer)
   (interactive)
@@ -857,11 +855,19 @@ Interactively, a prefix arg means to prompt for BUFFER."
     (modify-syntax-entry ?/ ". 14" table)
     table))
 
-(defvar-keymap sweep-mode-map
-  :doc "Keymap for `sweep-mode'."
-;;"C-c C-l" #'sweep-load-buffer
-  "C-c C-c" #'sweep-colourise-buffer
-  "C-c C-t" #'sweep-top-level)
+(defvar sweep-mode-map
+  (let ((map (make-sparse-keymap)))
+;;  (define-key map (kbd "C-c C-l") #'sweep-load-buffer)
+    (define-key map (kbd "C-c C-c") #'sweep-colourise-buffer)
+    (define-key map (kbd "C-c C-t") #'sweep-top-level)
+    map)
+  "Keymap for `sweep-mode'.")
+
+;; (defvar-keymap sweep-mode-map
+;;   :doc "Keymap for `sweep-mode'."
+;; ;;"C-c C-l" #'sweep-load-buffer
+;;   "C-c C-c" #'sweep-colourise-buffer
+;;   "C-c C-t" #'sweep-top-level)
 
 (defun sweep-indent-line ()
   (interactive)