From fdaf7d72a05ee4662a50a7986cb85e528e6740d6 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:05:30 +0200 Subject: [PATCH 1/7] Declare used function hpath:expand * hbut.el (hpath:expand): Declare function. --- hbut.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbut.el b/hbut.el index 116e4030..3f6343da 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: 10-Sep-26 at 08:50:44 by Bob Weiner +;; Last-Mod: 12-Sep-26 at 13:33:57 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -50,6 +50,7 @@ Use the function, (hbut:max-len), to read the proper value.") (declare-function hargs:delimited "hargs") (declare-function hargs:read-match "hargs") (declare-function hpath:display-buffer "hpath") +(declare-function hpath:expand "hpath") (declare-function hpath:file-position-to-line-and-column "hpath") (declare-function hpath:find "hpath") (declare-function hpath:find-noselect "hpath") From 94d5d457f6b970b59c6f62aa5552a36f3760397a Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:06:38 +0200 Subject: [PATCH 2/7] Define defsubst before use * hyrolo.el (hyrolo-hdr-at-p): Define before first use. --- hyrolo.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hyrolo.el b/hyrolo.el index 45a99266..d4561508 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: 29-Aug-26 at 23:35:44 by Bob Weiner +;; Last-Mod: 12-Sep-26 at 13:57:08 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -842,6 +842,10 @@ If ARG is zero, move to the beginning of the current line." ;; `hyrolo-file-list', so expand it. (hyrolo-expand-path-list hyrolo-file-list))) +(defsubst hyrolo-hdr-at-p () + "Return pos if point is at the start of a `hyrolo-mode' file header, else nil." + (text-property-any (point) (1+ (point)) :hyrolo-hdr t)) + ;;;###autoload (defun hyrolo-get-entry (name &optional regexp-flag exclude-sub-entries) "Return the first rolo entry string with a headline containing NAME. @@ -2035,10 +2039,6 @@ only (first line of entries), rather than entire entries. Return number of matching entries found." (hyrolo-grep-file hyrolo-file-or-buf (regexp-quote string) max-matches count-only headline-only)) -(defsubst hyrolo-hdr-at-p () - "Return pos if point is at the start of a `hyrolo-mode' file header, else nil." - (text-property-any (point) (1+ (point)) :hyrolo-hdr t)) - (defun hyrolo-hdr-in-p () "If point is within a file header, return t, else nil." (or (looking-at hyrolo-hdr-regexp) From 1840101d144b2d8fa32014bbc4fd5800487848b3 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:10:39 +0200 Subject: [PATCH 3/7] Remove unused lexical vars * hmouse-drv.el (hkey-help): Remove unused lexical vars. --- hmouse-drv.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index 73969c97..a9c18c19 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 04-Feb-90 -;; Last-Mod: 10-Sep-26 at 15:23:19 by Bob Weiner +;; Last-Mod: 12-Sep-26 at 14:01:53 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1158,11 +1158,6 @@ documentation is found." (let* ((actype (or (actype:elisp-symbol (hattr:get 'hbut:current 'actype)) (hattr:get 'hbut:current 'actype))) - (actype-doc-flag (and (symbolp actype) - (fboundp actype) - (documentation actype))) - (assist-function-flag (and assisting - actype-doc-flag)) (condition (car hkey-form)) (temp-buffer-show-hook (lambda (buf) From 02018859e525c2421578eb77af1830cb345bc144 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:11:45 +0200 Subject: [PATCH 4/7] Break up long docstring, remove unused lexical var * hmouse-drv.el (hkey-help-hbut): Break long docstring. Remove unused lexical var. --- hmouse-drv.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index a9c18c19..70a3678c 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -1331,14 +1331,14 @@ documentation is found." doc)) (defun hkey-help-hbut (&optional assisting) - "Display hbut help for Action or Assist Keys (if ASSISTING prefix arg is non-nil)." + "Display hbut help for Action or Assist Keys. +If ASSISTING prefix arg is non-nil show help for assist key." (interactive) (let* ((actype (or (actype:elisp-symbol (hattr:get 'hbut:current 'actype)) (hattr:get 'hbut:current 'actype))) (mouse-flag (when (mouse-event-p last-command-event) (or action-key-depress-position assist-key-depress-position))) - (mouse-drag-flag (hmouse-drag-p)) (temp-buffer-show-hook (lambda (buf) (set-buffer buf) From 1b6ca0aab665761e9f326e907050db3490bce354 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:14:01 +0200 Subject: [PATCH 5/7] Use let to define free var def * hmouse-drv.el (hkey-help-hbut): Make def lexical var. --- hmouse-drv.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index 70a3678c..4dfec689 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -1401,11 +1401,11 @@ If ASSISTING prefix arg is non-nil show help for assist key." ;; Need to save and restore 'hbut:current here ;; since `hywiki-get-definition' overwrites it (progn (hattr:copy 'hbut:current 'saved-but) - (setq def (hywiki-get-definition - (ibut:key-to-label lbl-key))) - (when (stringp def) - (terpri) - (princ def))) + (let ((def (hywiki-get-definition + (ibut:key-to-label lbl-key)))) + (when (stringp def) + (terpri) + (princ def)))) (hattr:copy 'saved-but 'hbut:current))) (unless (or assisting From 7178059b0be304bd2926bb8fc8e0ea703660d683 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 14:19:35 +0200 Subject: [PATCH 6/7] Add ChangeLog --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8e19d890..d0d038d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2026-09-12 Mats Lidell + +* hmouse-drv.el (hkey-help-hbut): Make def lexical var. + (hkey-help-hbut): Break long docstring. Remove unused lexical var. + (hkey-help): Remove unused lexical vars. + +* hyrolo.el (hyrolo-hdr-at-p): Define before first use. + +* hbut.el (hpath:expand): Declare function. + 2026-09-11 Mats Lidell * test/hywiki-tests.el (hywiki-tests--hywiki-face-regions): Add beg From 70285bfaf591968ef95da4fe62633283c025bb90 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sat, 12 Sep 2026 16:46:26 +0200 Subject: [PATCH 7/7] Review comment, add comma --- hmouse-drv.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index 4dfec689..a4bd09c7 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 04-Feb-90 -;; Last-Mod: 12-Sep-26 at 14:01:53 by Mats Lidell +;; Last-Mod: 12-Sep-26 at 16:43:46 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1332,7 +1332,7 @@ documentation is found." (defun hkey-help-hbut (&optional assisting) "Display hbut help for Action or Assist Keys. -If ASSISTING prefix arg is non-nil show help for assist key." +If ASSISTING prefix arg is non-nil, show help for assist key." (interactive) (let* ((actype (or (actype:elisp-symbol (hattr:get 'hbut:current 'actype))