]> git.eshelyaron.com Git - dict.git/commitdiff
FIXED: additional compatibility issue with buttons
authorEshel Yaron <me@eshelyaron.com>
Mon, 17 Oct 2022 15:27:13 +0000 (18:27 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 17 Oct 2022 15:27:13 +0000 (18:27 +0300)
sweeprolog.el

index 7e2cab54a2ddcf0cecd0b31ee12fd4f048657202..6162a38850668a92c20fdf57d962f96440445d02 100644 (file)
@@ -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)