diff --git a/ChangeLog b/ChangeLog index c36e38f7..1f34f53e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2026-06-18 Bob Weiner +* test/hibtypes-tests.el (ibtypes::ilink-test): Add and ensure only one + instance of this test. + * hywiki.el (hywiki-include-special-modes): Add to recognize HyWikiWords in particular special major modes, like eww and elfeed ones. (hywiki-potential-buffer-p): Use above setting in this function. diff --git a/hactypes.el b/hactypes.el index f80b0bc9..1981530a 100644 --- a/hactypes.el +++ b/hactypes.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 23-Sep-91 at 20:34:36 -;; Last-Mod: 14-Jun-26 at 16:06:31 by Bob Weiner +;; Last-Mod: 18-Jun-26 at 10:01:03 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -587,7 +587,9 @@ on the implicit button to which to link." (ibut:key-to-label name-key) key-src)))) - + ;; !! Left over code from an earlier version of `link-to-ibut' in case + ;; is ever needed for reference. rsw - 2026-06-18 + ;; ;; (if key-src ;; (unless (and (get-buffer key-src) ;; (not (hypb:buffer-file-name (get-buffer key-src)))) diff --git a/test/hibtypes-tests.el b/test/hibtypes-tests.el index e3afb297..8db88269 100644 --- a/test/hibtypes-tests.el +++ b/test/hibtypes-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell ;; ;; Orig-Date: 20-Feb-21 at 23:45:00 -;; Last-Mod: 14-Jun-26 at 15:57:15 by Bob Weiner +;; Last-Mod: 18-Jun-26 at 12:04:02 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -373,26 +373,31 @@ ;; ilink (ert-deftest ibtypes::ilink-test () "Verify link to ibut in same buffer." - (let ((file (make-temp-file "ilink"))) + (let ((file (make-temp-file "ilink-test"))) (unwind-protect (progn (find-file file) - (insert "\ - -<[Button]> -") + (insert "\n<[Button1]> ") (goto-char 4) - (should (string= "ARG" (ibtypes::ilink))) + (should (ibtype:test-p 'ilink)) + (should (= (ibut:act) 1)) + + ;; ilink with file name + (erase-buffer) + (insert "<[Button2]> ") + (save-excursion + (with-temp-buffer + (insert (format "\n" file)) + (goto-char 4) + (should (ibtype:test-p 'ilink)) + (should (= (ibut:act) 2)))) (erase-buffer) - (insert "\ - -<[Other]> -") + (insert "\n<[Other]> ") (goto-char 4) (let ((err (should-error (ibtypes::ilink)))) (should - (string-match-p (rx "No button " (any punct) "Button" (any punct) " in") + (string-match-p (rx "No button " (any punct) "Button3" (any punct) " in") (cadr err))))) (hy-delete-file-and-buffer file))))