From bf2035a20d4e2c461b8f487433fdc026d7232246 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 5 Jun 2026 14:46:49 +0200 Subject: [PATCH 1/5] Handle functions marked as obsolete in Emacs 31 * hui-mouse.el (smart-calendar, smart-calendar-assist): Use calendar-scroll-calendar-right and calendar-scroll-calendar-left. * hywiki.el (hywiki-org-format-heading): Use org-fold-core-remove-optimization. --- hui-mouse.el | 20 ++++++++++++++++---- hywiki.el | 10 ++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/hui-mouse.el b/hui-mouse.el index c8a94b2c..bc660072 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -889,9 +889,15 @@ If key is pressed: (interactive) (cond ((smart-eobp) (calendar-cursor-to-nearest-date) - (calendar-scroll-left-three-months 1)) + (if (fboundp 'calendar-scroll-calendar-left) + (calendar-scroll-calendar-left) + (with-suppressed-warnings ((obsolete calendar-scroll-left-three-months)) + (calendar-scroll-left-three-months 1)))) ((< (current-column) 5) (calendar-cursor-to-nearest-date) - (calendar-scroll-right-three-months 1)) + (if (fboundp 'calendar-scroll-calendar-right) + (calendar-scroll-calendar-right) + (with-suppressed-warnings ((obsolete calendar-scroll-right-three-months)) + (calendar-scroll-right-three-months 1)))) (t (calendar-cursor-to-nearest-date) (diary-view-entries 1)))) @@ -911,9 +917,15 @@ If assist key is pressed: (interactive) (cond ((smart-eobp) (calendar-cursor-to-nearest-date) - (calendar-scroll-right-three-months 1)) + (if (fboundp 'calendar-scroll-calendar-left) + (calendar-scroll-calendar-left) + (with-suppressed-warnings ((obsolete calendar-scroll-left-three-months)) + (calendar-scroll-left-three-months 1)))) ((< (current-column) 5) (calendar-cursor-to-nearest-date) - (calendar-scroll-left-three-months 1)) + (if (fboundp 'calendar-scroll-calendar-right) + (calendar-scroll-calendar-right) + (with-suppressed-warnings ((obsolete calendar-scroll-right-three-months)) + (calendar-scroll-right-three-months 1)))) (t (diary-mark-entries)))) ;;; ************************************************************************ diff --git a/hywiki.el b/hywiki.el index 23197e5f..9e2e2d6e 100644 --- a/hywiki.el +++ b/hywiki.el @@ -3426,7 +3426,10 @@ When NO-STATS is non-nil, don't include statistics in square brackets." ;; When using `org-fold-core--optimise-for-huge-buffers', ;; returned text will be invisible. Clear it up. (save-match-data - (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))) + (if (fboundp 'org-fold-core-remove-optimization) + (org-fold-core-remove-optimization (match-beginning 0) (match-end 0)) + (with-suppressed-warnings ((obsolete org-fold-core-remove-optimisation)) + (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))))) (let ((todo (and (not no-todo) (match-string 2 heading))) (priority (and (not no-priority) (match-string 3 heading))) (headline (pcase (match-string 4 heading) @@ -3446,7 +3449,10 @@ When NO-STATS is non-nil, don't include statistics in square brackets." "\\(?: +\\[[0-9%+/]+\\]\\)+" "" headline))) ;; Restore cleared optimization. - (org-fold-core-update-optimisation (match-beginning 0) (match-end 0)) + (if (fboundp 'org-fold-core-remove-optimization) + (org-fold-core-remove-optimization (match-beginning 0) (match-end 0)) + (with-suppressed-warnings ((obsolete org-fold-core-remove-optimisation)) + (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0)))) (mapconcat #'identity (delq nil (list todo priority headline tags)) " ")))))) From 50683bd47cd925bf0a5343a88636f53795a0671e Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 5 Jun 2026 14:58:39 +0200 Subject: [PATCH 2/5] Add type and group to defcustom * hui.el (hui:copy-message-length): Use type and group. --- hui.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hui.el b/hui.el index fd27d4bb..5960313e 100644 --- a/hui.el +++ b/hui.el @@ -64,7 +64,9 @@ (defcustom hui:copy-message-length 40 "Maximum character length of the message displayed after copying text. - Set to 0 for no message.") +Set to 0 for no message." + :type 'integer + :group 'hyperbole-buttons) (defcustom hui:ebut-prompt-for-action nil "Non-nil prompts for a button-specific action on explicit button creation." From 1d863e69c9ebe3240ce56da5c2493acc3ff95a01 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 5 Jun 2026 14:59:42 +0200 Subject: [PATCH 3/5] Declare used functions * hui.el (kcell-view:label): * hypb.el (smart-ancestor-tag-files): Declare function. --- hui.el | 1 + hypb.el | 1 + 2 files changed, 2 insertions(+) diff --git a/hui.el b/hui.el index 5960313e..d0ad0e38 100644 --- a/hui.el +++ b/hui.el @@ -51,6 +51,7 @@ (declare-function hywiki-referent-exists-p "hywiki") (declare-function kcell-view:absolute-reference "kotl/kview") (declare-function kcell-view:idstamp "kotl/kview") +(declare-function kcell-view:label "kotl/kview") (declare-function klink:absolute "kotl/klink") (declare-function klink:at-p "kotl/klink") (declare-function kotl-mode "kotl/kotl-mode") diff --git a/hypb.el b/hypb.el index 1911ac11..4d4be3bd 100644 --- a/hypb.el +++ b/hypb.el @@ -63,6 +63,7 @@ (defvar hsys-org-enable-smart-keys) ; "hsys-org.el" (declare-function kview:char-invisible-p "kotl/kview") (declare-function smart-eobp "hui-mouse") +(declare-function smart-ancestor-tag-files "hmouse-tag") ;;; ************************************************************************ ;;; Public variables From dc270bef7087ffa6878b58b3d4bd9d6c0658f2ce Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 5 Jun 2026 15:08:26 +0200 Subject: [PATCH 4/5] Add ChangeLog --- ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 47c53c1e..9f74fd2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2026-06-05 Mats Lidell + +* hui.el (kcell-view:label): Declare function. + (hui:copy-message-length): Use type and group. + +* hypb.el (smart-ancestor-tag-files): Declare function. + +* hui-mouse.el (smart-calendar, smart-calendar-assist): Use + calendar-scroll-calendar-right and calendar-scroll-calendar-left. + +* hywiki.el (hywiki-org-format-heading): Use + org-fold-core-remove-optimization. + 2026-06-04 Bob Weiner * hibtypes.el (hib-python-traceback, debugger-source): Fix 2nd regexp in From 803bcb021944e575ffe888f505c1ae0d75f5980a Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 5 Jun 2026 17:12:11 +0200 Subject: [PATCH 5/5] Insert function declaration in alphabet order --- hypb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypb.el b/hypb.el index 4d4be3bd..4cd04cca 100644 --- a/hypb.el +++ b/hypb.el @@ -62,8 +62,8 @@ (defvar hsys-org-enable-smart-keys) ; "hsys-org.el" (declare-function kview:char-invisible-p "kotl/kview") -(declare-function smart-eobp "hui-mouse") (declare-function smart-ancestor-tag-files "hmouse-tag") +(declare-function smart-eobp "hui-mouse") ;;; ************************************************************************ ;;; Public variables