branch: externals/hyperbole
commit 7e6d2e9659dac4310dd5d92d87724c0528fb351f
Author: Mats Lidell <[email protected]>
Commit: GitHub <[email protected]>
Remove flymake/flycheck/byte-compile warnings (#431)
---
hbut.el | 5 ++++-
hibtypes.el | 3 ++-
hui-mouse.el | 4 ++--
hui.el | 8 +++++---
hypb-ert.el | 5 +++--
hypb.el | 7 ++++---
hyrolo-logic.el | 7 +++++--
hyrolo.el | 29 +++++++++++++++++++----------
hywconfig.el | 9 ++++++---
kotl/kview.el | 5 ++++-
10 files changed, 54 insertions(+), 28 deletions(-)
diff --git a/hbut.el b/hbut.el
index 1b6d5862b0..2f55428706 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 18-Sep-91 at 02:57:09
-;; Last-Mod: 3-Jan-24 at 02:31:24 by Bob Weiner
+;; Last-Mod: 3-Jan-24 at 23:32:27 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -67,6 +67,9 @@ Use the function, (hbut:max-len), to read the proper value.")
(declare-function hpath:file-position-to-line-and-column "hpath")
+(declare-function hyrolo-hdr-move-after-p "hyrolo")
+(declare-function smart-eolp "hui-mouse")
+
;;; ************************************************************************
;;; Private variables
;;; ************************************************************************
diff --git a/hibtypes.el b/hibtypes.el
index a3e81f9ed7..e1e9bee453 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Sep-91 at 20:45:31
-;; Last-Mod: 3-Jan-24 at 01:38:08 by Bob Weiner
+;; Last-Mod: 3-Jan-24 at 23:34:58 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -76,6 +76,7 @@
(declare-function symtable:add "hact")
(declare-function hyrolo-get-file-list "hyrolo")
+(declare-function ert-test-boundp "ert")
;;; ************************************************************************
;;; Public implicit button types
diff --git a/hui-mouse.el b/hui-mouse.el
index 39cc36efdc..7781a6a650 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Feb-89
-;; Last-Mod: 3-Jan-24 at 13:54:31 by Bob Weiner
+;; Last-Mod: 3-Jan-24 at 23:43:10 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -115,7 +115,7 @@ In other context signal an error."
(hypb:error "(Hyperbole Action Key): No action defined for this context;
try another location")))
(defun assist-key-error ()
- "If in Org mode and Hyperbole shares {M-RET}, run 'org-meta-return'.
+ "If in Org mode and Hyperbole shares {M-RET}, run `org-meta-return'.
In other context, signal an error."
(if (and (funcall hsys-org-mode-function)
(hsys-org-meta-return-shared-p))
diff --git a/hui.el b/hui.el
index 987864f5e6..a2d7db4bd5 100644
--- a/hui.el
+++ b/hui.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Sep-91 at 21:42:03
-;; Last-Mod: 2-Jan-24 at 23:02:06 by Bob Weiner
+;; Last-Mod: 3-Jan-24 at 23:42:18 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -1141,7 +1141,8 @@ link button and return t; otherwise, return nil.
With optional DEPRESS-WINDOW and RELEASE-WINDOW, use the points
from those instead. See also documentation for `hui:link-possible-types'.
-An Assist Mouse Key drag between windows (when not on an item) runs this
command."
+An Assist Mouse Key drag between windows (when not on an item)
+runs this command."
(interactive (progn
;; Clear smart key variables so this does not
;; improperly reference values left over from a prior
@@ -1243,7 +1244,8 @@ With optional NAME-ARG-FLAG (interactively, the prefix
argument set to
anything other than a single C-u (list 4)), prompt for a name to precede
the implicit button.
-An Action Mouse Key drag between windows (when not on an item) runs this
command."
+An Action Mouse Key drag between windows (when not on an item)
+runs this command."
(interactive (progn
;; Clear smart key variables so this does not
;; improperly reference values left over from a prior
diff --git a/hypb-ert.el b/hypb-ert.el
index 52b7c7170d..389461633c 100644
--- a/hypb-ert.el
+++ b/hypb-ert.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]> and Bob Weiner <[email protected]>
;;
;; Orig-Date: 31-Mar-21 at 21:11:00
-;; Last-Mod: 3-Jan-24 at 03:37:28 by Bob Weiner
+;; Last-Mod: 4-Jan-24 at 14:10:39 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -40,7 +40,8 @@
(if (memq 'message-fn (actype:params #'ert-run-tests-interactively))
;; Suppress ert messages so last test case message stays in the
minibuffer;
;; 3rd arg message-fn available only in Emacs 27 and earlier
- (ert selector nil #'hypb-ert-message-function)
+ (with-suppressed-warnings ((callargs ert))
+ (ert selector nil #'hypb-ert-message-function))
(ert selector))
;; ERT can display a long internal data structure as a result, so
;; replace it in the minibuffer with a blank message.
diff --git a/hypb.el b/hypb.el
index 798337fd21..538107e289 100644
--- a/hypb.el
+++ b/hypb.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 6-Oct-91 at 03:42:38
-;; Last-Mod: 23-Dec-23 at 23:57:52 by Bob Weiner
+;; Last-Mod: 3-Jan-24 at 23:44:37 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -852,8 +852,9 @@ PACKAGE-NAME may be a symbol or a string."
;;;###autoload
(defmacro hypb:remove-from-plist (place name)
"Remove from property list PLACE a NAME string.
-PLACE may be a symbol, or any generalized variable allowed by `setf'.
-The form generated by the macro returns true if NAME was found and removed,
nil otherwise."
+PLACE may be a symbol, or any generalized variable allowed by
+`setf'. The form generated by the macro returns true if NAME was
+found and removed, nil otherwise."
(declare (debug (place form)))
(gv-letplace (tval setter) place
(macroexp-let2 macroexp-copyable-p tname name
diff --git a/hyrolo-logic.el b/hyrolo-logic.el
index f96b779fb0..9171b3106b 100644
--- a/hyrolo-logic.el
+++ b/hyrolo-logic.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 13-Jun-89 at 22:57:33
-;; Last-Mod: 26-Dec-23 at 20:46:10 by Bob Weiner
+;; Last-Mod: 4-Jan-24 at 14:00:13 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -89,7 +89,10 @@ flag is non-nil. With optional KOUTLINE-FLAG, map entries
with
`hyrolo-map-kotl' rather than `hyrolo-map-entries'.
A complex example of EXPR might be:
- (and (or (not time card) (xor (and french \"red balloons\") spanish))
teacher pet)
+ (and
+ (or (not time card) (xor (and french \"red balloons\") spanish))
+ teacher
+ pet)
which means:
(Match neither `time' nor `card'
or
diff --git a/hyrolo.el b/hyrolo.el
index 54bd1e4a55..07f21d3abe 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 7-Jun-89 at 22:08:29
-;; Last-Mod: 31-Dec-23 at 11:53:19 by Bob Weiner
+;; Last-Mod: 4-Jan-24 at 00:12:17 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -102,6 +102,7 @@
(defvar org-outline-regexp-bol) ; "org.el"
(defvar markdown-regex-header) ; "markdown-mode.el"
(defvar google-contacts-buffer-name) ; "ext:google-contacts.el"
+(defvar hbut:source-prefix) ; "hbut.el"
;; Forward declarations
(defvar hyrolo--wconfig)
@@ -185,7 +186,7 @@ See `hyrolo-hdr-and-entry-regexp'")
(concat hyrolo-hdr-regexp
"\\|^" (if (boundp 'hbut:source-prefix) hbut:source-prefix "@loc> ")
"\\|")
- "Regular expression to prefix to `hyrolo-hdr-and-entry-regexp' and
`outline-regexp'.
+ "Regexp to prefix to `hyrolo-hdr-and-entry-regexp' and `outline-regexp'.
It must not contain any parenthesized match groupings.")
(defvar hyrolo-entry-regexp "^\\([*\^L]+\\)\\([ \t\n\r]+\\)"
@@ -248,7 +249,8 @@ It must contain a %s indicating where to put the entry name
and a second
:group 'hyperbole-hyrolo)
(defvar hyrolo-entry-name-regexp "[-_a-zA-Z0-9@.]+\\( ?, ?[-_a-zA-Z0-9@.]+\\)?"
- "*Regexp matching a hyrolo entry name after matching to
`hyrolo-hdr-and-entry-regexp'.")
+ "*Regexp matching a hyrolo entry name.
+The match is after matching to `hyrolo-hdr-and-entry-regexp'.")
(defconst hyrolo-markdown-suffix-regexp
"md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn"
"Regexp matching Markdown file suffixes.")
@@ -1064,7 +1066,8 @@ any rolo entry of the given level, not the beginning of a
line (^); an
example, might be (regexp-quote \"**\") to match level two. Return number
of groupings sorted.
-Current buffer should be an editable HyRolo source location, not the match
buffer."
+Current buffer should be an editable HyRolo source location, not
+the match buffer."
(interactive "sRegexp for level's entries: \nP")
;; Divide by 2 in next line because each asterisk character is preceded
;; by a regexp-quote backslash character.
@@ -1780,7 +1783,8 @@ Return number of matching entries found."
(defun hyrolo-map-level (func level-regexp &optional max-groupings)
"Perform FUNC in current buffer on groupings of entries at level
LEVEL-REGEXP.
-Current buffer should be an editable HyRolo source location, not the match
buffer.
+Current buffer should be an editable HyRolo source location, not
+the match buffer.
Limit to a maximum of optional argument MAX-GROUPINGS. Nil value
of MAX-GROUPINGS means all groupings at the given level. FUNC
@@ -1845,7 +1849,10 @@ Return number of groupings matched."
This mode does not add any outline-related font-locking.
See the command `outline-mode' for more information on this mode."
- nil " Outl" nil
+ ;; nil " Outl" nil ;; FIXME: From when is this obsolete?
+ :init-value nil
+ :lighter " Outl"
+ :keymap nil
(if hyrolo-outline-minor-mode
;; enable minor mode
(progn
@@ -2860,7 +2867,8 @@ Both positions may be nil if there are no matches yet
found."
(list nil nil))))
(defun hyrolo--cache-get-major-mode-from-index (major-mode-index)
- "Return `major-mode' key from hash table entry with key MAJOR-MODE-INDEX,
else nil."
+ "Return `major-mode' key from hash table entry with key MAJOR-MODE-INDEX.
+Return nil if not found."
(gethash major-mode-index hyrolo--cache-index-to-major-mode-hasht))
(defun hyrolo-cache-get-major-mode-from-pos (pos)
@@ -2894,9 +2902,10 @@ Call whenever `hyrolo-display-buffer' is changed."
"Cache buffer `major-mode' for MATCHED-BUF with point in HyRolo display
buffer.
MATCHED-BUF must be a live buffer, not a buffer name.
-Push (point-max) of `hyrolo-display-buffer' onto
`hyrolo--cache-loc-match-bounds'.
-Push hash table's index key to `hyrolo--cache-major-mode-indexes'.
-Ensure MATCHED-BUF's `major-mode' is stored in the hash table."
+Push (point-max) of `hyrolo-display-buffer' onto
+`hyrolo--cache-loc-match-bounds'. Push hash table's index key to
+`hyrolo--cache-major-mode-indexes'. Ensure MATCHED-BUF's
+`major-mode' is stored in the hash table."
(with-current-buffer hyrolo-display-buffer
(let* ((matched-buf-major-mode (buffer-local-value 'major-mode
matched-buf))
(matched-buf-major-mode-name (symbol-name matched-buf-major-mode))
diff --git a/hywconfig.el b/hywconfig.el
index 673b10acc6..fa75fbfb38 100644
--- a/hywconfig.el
+++ b/hywconfig.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 15-Mar-89
-;; Last-Mod: 23-Dec-23 at 01:21:23 by Bob Weiner
+;; Last-Mod: 4-Jan-24 at 14:15:30 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -204,7 +204,8 @@ oldest one comes the newest one."
(defun hywconfig-named-get (name)
"Return the selected frame's window configuration with NAME."
- (lax-plist-get (hywconfig-named-get-entries) name))
+ (with-suppressed-warnings ((obsolete lax-plist-get)) ;; Obsolete since 29.1,
use plist-get
+ (lax-plist-get (hywconfig-named-get-entries) name)))
(defun hywconfig-named-get-names ()
"Return the selected frame's list of window configuration names."
@@ -216,7 +217,9 @@ oldest one comes the newest one."
(defun hywconfig-named-put (name wconfig)
"Add NAMEd WCONFIG to selected frame's plist of named window configurations."
- (hywconfig-named-set-entries (lax-plist-put (hywconfig-named-get-entries)
name wconfig)))
+ (hywconfig-named-set-entries
+ (with-suppressed-warnings ((obsolete lax-plist-put)) ;; Obsolete since
29.1, use plist-get
+ (lax-plist-put (hywconfig-named-get-entries) name wconfig))))
(defun hywconfig-named-remove (name)
"Remove the selected frame's stored window configuration with NAME."
diff --git a/kotl/kview.el b/kotl/kview.el
index 63f8a7edca..26b444bc53 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 6/30/93
-;; Last-Mod: 20-Dec-23 at 17:27:44 by Bob Weiner
+;; Last-Mod: 4-Jan-24 at 13:59:44 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -26,6 +26,9 @@
;;; ************************************************************************
(defvar kotl-mode:refill-flag)
+(defvar hyrolo-display-buffer)
+(defvar hyrolo-hdr-regexp)
+(defvar hbut:source-prefix)
(declare-function klabel:format "klabel.el")
(declare-function klabel:idstamp-p "klabel.el")