Skip to content

Commit

Permalink
Suppress byte compile warnings calling org-id-get (#665)
Browse files Browse the repository at this point in the history
Later version of org added a fourth argument that we want to use if
available.
  • Loading branch information
matsl authored Feb 6, 2025
1 parent 74540e9 commit e81710d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2025-02-05 Mats Lidell <[email protected]>

* hywiki.el (hywiki-add-org-id): Suppress byte compile warnings for calling org-id-get with
different number of args. Later versions have a fourth optional arg that we use.

2025-02-02 Mats Lidell <[email protected]>

* test/hui-tests.el (hui--kill-highlighted-region-default-settings): Add test for hui-kill-region
Expand Down
7 changes: 4 additions & 3 deletions hywiki.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Acpr-24 at 22:41:13
;; Last-Mod: 2-Feb-25 at 14:45:23 by Bob Weiner
;; Last-Mod: 5-Feb-25 at 22:21:38 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1113,9 +1113,10 @@ calling this function."
(user-error "(hywiki-add-org-id): Referent buffer <%s> must be in org-mode, not %s"
(buffer-name)
major-mode))
(let ((org-id (if (>= (action:param-count #'org-id-get) 4)
(let ((org-id (hyperb:with-suppressed-warnings ((callargs org-id-get))
(if (>= (action:param-count #'org-id-get) 4)
(org-id-get nil nil nil t)
(org-id-get))))
(org-id-get)))))
(when (and (null org-id) buffer-read-only)
(user-error "(hywiki-add-org-id): Referent buffer <%s> point has no Org ID and buffer is read-only"
(buffer-name)))
Expand Down

0 comments on commit e81710d

Please sign in to comment.