From: Eshel Yaron Date: Sun, 26 Nov 2023 10:47:15 +0000 (+0100) Subject: Use a few more hook functions also in top-level buffers X-Git-Tag: V9.1.19-sweep-0.27.2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50f7d6f9ebc54e5a846b743a92d4aac06a31d1a0;p=sweep.git Use a few more hook functions also in top-level buffers * 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'. --- diff --git a/sweeprolog.el b/sweeprolog.el index 4f122da..50eff18 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -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)