From: Eshel Yaron Date: Mon, 17 Oct 2022 15:27:13 +0000 (+0300) Subject: FIXED: additional compatibility issue with buttons X-Git-Tag: V8.5.19~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ab910bbfca353d3995ef134f0d366a0cbf194aa;p=sweep.git FIXED: additional compatibility issue with buttons --- diff --git a/sweeprolog.el b/sweeprolog.el index 7e2cab5..6162a38 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -2938,6 +2938,11 @@ if-then-else constructs in SWI-Prolog." (tabulated-list-print)) (pop-to-buffer-same-window buf))) +(defun sweeprolog--buttonize (string callback data) + (if (fboundp 'buttonize) + (buttonize string callback data) + (button-buttonize string callback data))) + (defun sweeprolog--buttonize-region (start end callback data) (if (fboundp 'buttonize-region) (buttonize-region start end callback data) @@ -3029,10 +3034,10 @@ if-then-else constructs in SWI-Prolog." :type 'swi-prolog-module :file path)) (if page - (insert (buttonize mod #'sweeprolog-find-module mod) + (insert (sweeprolog--buttonize mod #'sweeprolog-find-module mod) " is a SWI-Prolog module.\n\n" page) - (insert (buttonize mod #'sweeprolog-find-module mod) + (insert (sweeprolog--buttonize mod #'sweeprolog-find-module mod) " is an undocumented SWI-Prolog module."))) (insert mod " is not documented as a SWI-Prolog module.")))))) @@ -3063,7 +3068,7 @@ if-then-else constructs in SWI-Prolog." (list :symbol (intern pred) :type 'swi-prolog-predicate :file path)) - (insert (buttonize pred #'sweeprolog-find-predicate pred) + (insert (sweeprolog--buttonize pred #'sweeprolog-find-predicate pred) (if page (concat " is a SWI-Prolog predicate.\n\n" page)