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 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") diff --git a/hmouse-drv.el b/hmouse-drv.el index 73969c97..a4bd09c7 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 16:43:46 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) @@ -1336,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) @@ -1406,11 +1401,11 @@ documentation is found." ;; 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 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)