]> git.eshelyaron.com Git - sweep.git/commitdiff
Use a few more hook functions also in top-level buffers
authorEshel Yaron <me@eshelyaron.com>
Sun, 26 Nov 2023 10:47:15 +0000 (11:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 Nov 2023 10:47:15 +0000 (11:47 +0100)
* sweeprolog.el (sweeprolog-top-level-mode): Set
'forward-sexp-function', 'beginning-of-defun-function',
'end-of-defun-function' and 'syntax-propertize-function' hooks to
their Prolog-specific value that we already use in 'sweeprolog-mode'.

sweeprolog.el

index 4f122da31b8b51868b63179f2c33a7a0275d30b6..50eff18cf2eeea2e8ffaab1ac8c25963f42b0941 100644 (file)
@@ -3658,7 +3658,11 @@ GOAL.  Otherwise, GOAL is set to a default value specified by
                                                   (length s)))
               comint-delimiter-argument-list '(?,)
               comint-highlight-input nil
-              comment-start "%")
+              comment-start "%"
+              forward-sexp-function #'sweeprolog-forward-sexp-function
+              beginning-of-defun-function #'sweeprolog-beginning-of-top-term
+              end-of-defun-function #'sweeprolog-end-of-top-term
+              syntax-propertize-function sweeprolog-syntax-propertize-function)
   (add-hook 'post-self-insert-hook #'sweeprolog-top-level--post-self-insert-function nil t)
   (add-hook 'completion-at-point-functions #'sweeprolog-top-level-completion-at-point nil t)
   (add-hook 'after-change-functions #'sweeprolog-colourise-query nil t)