From: Eshel Yaron Date: Thu, 8 Jun 2023 17:37:13 +0000 (+0300) Subject: FIXED: Don't change hooks globally X-Git-Tag: V9.1.10-sweep-0.19.0~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f0c2b1c379832708cb5faef2962b2fd22f3ee43;p=sweep.git FIXED: Don't change hooks globally * sweeprolog.el (sweeprolog-mode): Extend 'kill-buffer-hook' and 'context-menu-functions' locally rather than global. --- diff --git a/sweeprolog.el b/sweeprolog.el index 1f22c93..e7b0a4f 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -4446,14 +4446,15 @@ certain contexts to maintain conventional Prolog layout." (add-hook 'kill-buffer-hook (lambda () (when (timerp sweeprolog--timer) - (cancel-timer sweeprolog--timer))))) + (cancel-timer sweeprolog--timer))) + nil t)) (when sweeprolog-enable-cursor-sensor (add-hook 'sweeprolog-analyze-region-fragment-hook #'sweeprolog-analyze-fragment-variable nil t) (cursor-sensor-mode 1)) (when (boundp 'context-menu-functions) (add-hook 'context-menu-functions - #'sweeprolog-context-menu-function)) + #'sweeprolog-context-menu-function nil t)) (unless (member 'sweeprolog-hole yank-excluded-properties) (setq-local yank-excluded-properties (cons 'sweeprolog-hole yank-excluded-properties))))