From 60aa222ac1751b2e6ec2a431490347d2c0f61c5c Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 20:19:02 +0100 Subject: [PATCH 01/30] Remove defalias of display-color-p display-color-p has been defined since Emacs 21.1. * hproperty.el: Remove defalias of display-color-p, defined since Emacs 21.1 --- hproperty.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hproperty.el b/hproperty.el index 38b6d8d6..f74bcba8 100644 --- a/hproperty.el +++ b/hproperty.el @@ -144,11 +144,6 @@ This is shown when hovering over the button with the mouse." ;;; Public functions ;;; ************************************************************************ -;; Support NEXTSTEP and X window systems. -(and (not (fboundp 'display-color-p)) - (fboundp 'x-display-color-p) - (defalias 'display-color-p 'x-display-color-p)) - (defun hproperty:but-add (start end face) "Add a button between START and END using FACE in the current buffer. Button is added only if it does not already exist. If it does exist From eee4fa54866261581801af10565bd93336a4a07d Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 20:24:37 +0100 Subject: [PATCH 02/30] Use repeat-mode, defined since Emacs 28.1 * hsys-flymake.el (flymake-mode-hook): Use repeat-mode, defined since Emacs 28.1. --- hsys-flymake.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hsys-flymake.el b/hsys-flymake.el index 4873af3b..8e95f8a1 100644 --- a/hsys-flymake.el +++ b/hsys-flymake.el @@ -179,9 +179,7 @@ Issue is inserted into the buffer after the current visible line." (lambda () (when flymake-mode (define-key flymake-mode-map "\C-c" hsys-flymake-mode-control-c-prefix-map) - ;; probably Emacs 28 or greater - (when (fboundp 'repeat-mode) - (repeat-mode 1))))) + (repeat-mode 1)))) ;; If flymake-mode is already enabled, re-enable it to ensure ;; repeat-mode gets enabled. (when (and (featurep 'flymake) flymake-mode) From e073188bd027540b211ae505c94b5bc11678273c Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 20:45:56 +0100 Subject: [PATCH 03/30] Use button-at, defined in Emacs before version 28 * hui-mouse.el (hkey-alist): Use button-at, defined in Emacs before version 28. --- hui-mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hui-mouse.el b/hui-mouse.el index e0210abf..f75e9f0d 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -256,7 +256,7 @@ The button's attributes are stored in the symbol, `hbut:current'.") . ((smart-dired-sidebar) . (smart-dired-sidebar))) ;; ;; Handle Emacs push buttons in buffers - ((and (fboundp 'button-at) (button-at (point))) + ((button-at (point)) . ((smart-push-button nil (mouse-event-p last-command-event)) . (smart-push-button-help nil (mouse-event-p last-command-event)))) ;; From b9dd03d3c1cd4b32a4f623b646623a7cb4b34798 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 21:07:18 +0100 Subject: [PATCH 04/30] Use macroexp-file-name, defined since Emacs 28.1 * hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1. --- hyperbole.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hyperbole.el b/hyperbole.el index 01ecfab9..24194fa5 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -586,9 +586,7 @@ frame, those functions by default still return the prior frame." ;; Autoload this form so that when `package.el' activates Hyperbole's autoloads ;; it also sets up Kotl's autoloads. ;;;###autoload -(let ((us (if (fboundp 'macroexp-file-name) - (macroexp-file-name) - load-file-name))) +(let ((us (macroexp-file-name))) (when us ;; Contrary to the usual ELPA autoloads files, `kotl-autoloads' ;; does not add its directory to `load-path', so let's do it here From 0b7d1497f16d697399c9b9335c0aa178f8263073 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 21:23:29 +0100 Subject: [PATCH 05/30] Use dired-do-flagged-delete, defined since before Emacs 28 Used in smart-dired where dired must have been loaded. * hui-mouse.el (smart-dired): Use dired-do-flagged-delete, defined since before Emacs 28. --- hui-mouse.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hui-mouse.el b/hui-mouse.el index f75e9f0d..80605e17 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -999,12 +999,7 @@ If key is pressed: (if (save-excursion (goto-char (point-min)) (re-search-forward "^D" nil t)) - (cond ;; For Tree-dired compatibility - ((fboundp 'dired-do-flagged-delete) - (dired-do-flagged-delete)) - ((fboundp 'dired-do-deletions) - (dired-do-deletions)) - (t (error "(smart-dired): No Dired expunge function"))))) + (dired-do-flagged-delete))) (t (hpath:find (smart-dired-pathname-up-to-point))))) ((last-line-p) (quit-window)) (t (hpath:find (or (dired-get-filename nil t) ""))))) From 54bb0da09f4884b9debf83621c84f8086b77cb98 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 21:40:37 +0100 Subject: [PATCH 06/30] Use current-time-zone, defined in Emacs 25.1 * htz.el (htz:zone-to-hour): Use current-time-zone, defined in Emacs 25.1 --- htz.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htz.el b/htz.el index 736f9bf6..765bbf0b 100644 --- a/htz.el +++ b/htz.el @@ -46,8 +46,7 @@ (defvar htz:local (let ((local-tz (or (getenv "TZ") (getenv "TIMEZONE") - (if (fboundp 'current-time-zone) - (car (cdr (current-time-zone)))) + (car (cdr (current-time-zone))) (progn (require 'hypb) (hypb:call-process-p @@ -400,10 +399,9 @@ Optional argument TIMEZONE specifies a time zone." (setq timezone (or (cdr (assoc (upcase timezone) htz:world-timezones)) - (and (fboundp 'current-time-zone) - (if (listp (current-time-zone)) - (/ (car (current-time-zone)) 36) - (current-time-zone))) + (if (listp (current-time-zone)) + (/ (car (current-time-zone)) 36) + (current-time-zone)) timezone)) (if (stringp timezone) (setq timezone (string-to-number timezone))) From a3a13ed9497b42d9cdf26e527461680ed6339424 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 21:45:25 +0100 Subject: [PATCH 07/30] Use last, defined before Emacs 28 * hui-window.el (assist-key-modeline-click-left-edge): Use last, defined before Emacs 28. --- hui-window.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hui-window.el b/hui-window.el index 3e861d2d..c0e1c1b9 100644 --- a/hui-window.el +++ b/hui-window.el @@ -302,10 +302,7 @@ and release to register a diagonal drag.") (defun assist-key-modeline-click-left-edge () "Default function run on an Assist Mouse Key click at a modeline left edge." - (if (fboundp 'last) - (switch-to-buffer (car (last (buffer-list)))) - (let ((buffers (buffer-list))) - (switch-to-buffer (nth (1- (length buffers)) buffers))))) + (switch-to-buffer (car (last (buffer-list))))) (defun action-key-modeline-click-right-edge () "Default function run on an Action Mouse Key click at a modeline right edge." From 48312414be241d3145e4979321c22b579e174251 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 21:53:22 +0100 Subject: [PATCH 08/30] Use make-directory, defined since Emacs 19.34 * hinit.el (hyperb:check-dir-user): Use make-directory, defined since Emacs 19.34. --- hinit.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hinit.el b/hinit.el index 51aeda85..3ea4f594 100644 --- a/hinit.el +++ b/hinit.el @@ -90,9 +90,7 @@ ((not (file-writable-p parent-dir)) (error "(hyperb:init): `hbmap:dir-user' parent directory not writable")) - ((or (if (fboundp 'make-directory) - (progn (make-directory hbmap:dir-user) t)) - (hypb:call-process-p "mkdir" nil nil hbmap:dir-user)) + ((progn (make-directory hbmap:dir-user) t) (or (file-writable-p hbmap:dir-user) (or (progn (hypb:chmod '+ 700 hbmap:dir-user) (file-writable-p hbmap:dir-user)) From 6c63a5aa7b6dd3a1279f5d7d404c5f62bc5a0862 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 22:12:44 +0100 Subject: [PATCH 09/30] Always use split-window-vertically The preferred function split-window-quietly is admittedly mentioned in the Emacs Lisp Intro and can be found at archives in the file slowsplit.el. Implemented 1989. Questionable if it relevant today. Having it as a preferred alternative seems confusing. * hui-window.el (hmouse-horizontal-action-drag): Use split-window-vertically. --- hui-window.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hui-window.el b/hui-window.el index c0e1c1b9..c3cf74e3 100644 --- a/hui-window.el +++ b/hui-window.el @@ -810,9 +810,7 @@ Adds a window below this one. Beep and print message if the window cannot be split further." (interactive) (condition-case () - (if (fboundp 'split-window-quietly) - (split-window-quietly nil) - (split-window-vertically nil)) + (split-window-vertically nil) (error (beep) (message "(hmouse-horizontal-action-drag): Can't split the window further.")))) From 3d648faeff87078e8a2c8b8b76413646e1cd739d Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 22:32:24 +0100 Subject: [PATCH 10/30] Remove XEmacs functions, don't check for Emacs functions Info-global-next and Info-global-prev is not Emacs functions but in XEmacs. mouse-event-p and Info-mouse-follow-link is defined before Emacs 28. * hmouse-info.el (smart-info): Use Info-next and mouse-event-p. (smart-info-assist): Use Info-prev and mouse-event-p. --- hmouse-info.el | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/hmouse-info.el b/hmouse-info.el index 1c11892e..64c53069 100644 --- a/hmouse-info.el +++ b/hmouse-info.el @@ -91,23 +91,17 @@ or a Menu; otherwise returns nil." ;; If at end of node, go to next node ;; ((last-line-p) - (if (fboundp 'Info-global-next) - (Info-global-next) - (Info-next))) - ((and (fboundp 'Info-mouse-follow-link) - (mouse-event-p action-key-release-args) + (Info-next)) + ((and (mouse-event-p action-key-release-args) (let ((opoint (point))) (Info-mouse-follow-link action-key-release-args) (/= opoint (point))))) - ((and (fboundp 'mouse-event-p) - (not (mouse-event-p action-key-release-args)) + ((and (not (mouse-event-p action-key-release-args)) (Info-handle-in-node-hdr))) ((Info-handle-in-note)) ((Info-handle-in-menu)) ((pos-visible-in-window-p (point-max)) - (if (fboundp 'Info-global-next) - (Info-global-next) - (Info-next))) + (Info-next)) ;; ;; If nothing else scroll forward a windowful. ;; @@ -138,22 +132,17 @@ or a Menu; otherwise returns nil." ;; If at end or beginning of node, go to previous node ;; ((last-line-p) - (if (fboundp 'Info-global-prev) (Info-global-prev) - (Info-prev))) - ((and (fboundp 'Info-mouse-follow-link) - (mouse-event-p assist-key-release-args) + (Info-prev)) + ((and (mouse-event-p assist-key-release-args) (let ((opoint (point))) (Info-mouse-follow-link assist-key-release-args) (/= opoint (point))))) - ((and (fboundp 'mouse-event-p) - (not (mouse-event-p assist-key-release-args)) + ((and (not (mouse-event-p assist-key-release-args)) (Info-handle-in-node-hdr-assist))) ((Info-handle-in-note)) ((Info-handle-in-menu)) ((pos-visible-in-window-p (point-min)) - (if (fboundp 'Info-global-prev) - (Info-global-prev) - (Info-prev))) + (Info-prev)) ;; ;; If anywhere else, scroll backward a windowful. ;; From 0ebdad13f50b15b546ecffacffc0730bc32c3dc2 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 22:45:10 +0100 Subject: [PATCH 11/30] Use window-edges C source code function defined long before Emacs 28 * hui-window.el (smart-coords-in-window-p): Use window-edges, defined before Emacs 28. --- hui-window.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hui-window.el b/hui-window.el index c3cf74e3..f4e3372c 100644 --- a/hui-window.el +++ b/hui-window.el @@ -831,7 +831,7 @@ Beep and print message if the sole window which cannot be deleted." (setq w-or-f (frame-selected-window w-or-f))) (when (and (eq w-or-f window) (window-valid-p window)) window))) - ((fboundp 'window-edges) + (t (let* ((edges (window-edges window)) (w-xmin (nth 0 edges)) (w-ymin (nth 1 edges)) From 42c162afea83c06a394bbabd1855d63326aaa39e Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:13:25 +0100 Subject: [PATCH 12/30] Use text-scale-increase and text-scale-decrease Functions have been in Emacs since before Emacs 28 and is used elsewhere without fboundp guard. * hycontrol.el (hycontrol-windows-mode-map): Use text-scale-increase and text-scale-decrease. --- hycontrol.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hycontrol.el b/hycontrol.el index b050c3d2..2255b485 100644 --- a/hycontrol.el +++ b/hycontrol.el @@ -431,12 +431,8 @@ for it to be omitted by `list-buffers'." (define-key map "u" 'unbury-buffer) (define-key map "w" (lambda () (interactive) (enlarge-window-horizontally hycontrol-arg))) (define-key map "X" (lambda () (interactive) (text-scale-increase 0))) - (define-key map "Z" (lambda () (interactive) (if (fboundp 'text-scale-increase) - ;; Emacs autoloaded function - (text-scale-increase (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1)))))) - (define-key map "z" (lambda () (interactive) (if (fboundp 'text-scale-decrease) - ;; Emacs autoloaded function - (text-scale-decrease (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1)))))) + (define-key map "Z" (lambda () (interactive) (text-scale-increase (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1))))) + (define-key map "z" (lambda () (interactive) (text-scale-decrease (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1))))) ;; Don't call these interactively because a prefix arg of 1 tries ;; to make one window 1 line tall. From 5c5d751e11410fd472459384768887d8d417397d Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:22:16 +0100 Subject: [PATCH 13/30] Use use-region-p, defined since Emacs 23.1 * hui-select.el (hui-select-thing): Use use-region-p, defined since Emacs 23.1. --- hui-select.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hui-select.el b/hui-select.el index ae33baab..fa800f48 100644 --- a/hui-select.el +++ b/hui-select.el @@ -650,7 +650,7 @@ invoke that command instead. Typically prevents clashes over {\\`C-c' RET}, {\\`C-c´ \\`C-m'}." (interactive "p") (when interactive-flag - (cond ((and (fboundp 'use-region-p) (use-region-p)) + (cond ((use-region-p) nil) ((and transient-mark-mode mark-active) nil) From bc686ba1d0c0ced3b7a73f77199cc336dacefded Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:26:10 +0100 Subject: [PATCH 14/30] locate-data-file is not an Emacs function The function comes likely from old XEmacs supports since it is defined in XEmacs. * hypb.el (hypb:hkey-help-file): Do not check for locate-data-file, it is not an Emacs function. --- hypb.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hypb.el b/hypb.el index fddfceb6..97af5d44 100644 --- a/hypb.el +++ b/hypb.el @@ -713,17 +713,15 @@ This will this install the Emacs helm package when needed." (defun hypb:hkey-help-file () "Return the full path to the Hyperbole mouse key help file." - (cond ((and (fboundp 'locate-data-file) - (locate-data-file "hkey-help.txt"))) - (t (let* ((hypb-man (expand-file-name "man/" hyperb:dir)) - (help-file (expand-file-name "hkey-help.txt" hypb-man))) - (if (or (file-exists-p help-file) - (file-exists-p - (setq help-file (expand-file-name - "hkey-help.txt" data-directory)))) - help-file - (error "(hypb:hkey-help-file): Non-existent file: \"%s\"" - help-file)))))) + (let* ((hypb-man (expand-file-name "man/" hyperb:dir)) + (help-file (expand-file-name "hkey-help.txt" hypb-man))) + (if (or (file-exists-p help-file) + (file-exists-p + (setq help-file (expand-file-name + "hkey-help.txt" data-directory)))) + help-file + (error "(hypb:hkey-help-file): Non-existent file: \"%s\"" + help-file)))) (defvar hypb:in-string-and-tick (cons nil 0)) From fd04e97bfb3533b20c47b4077add935b71686546 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:36:38 +0100 Subject: [PATCH 15/30] Do not use none Emacs functions Remove use of compiled-function-interactive and compiled-function-arglist. Not Emacs functions. Comes from XEmacs. * hact.el (action:commandp): Do not use compiled-function-interactive. (action:params): Do not use compiled-function-arglist. Not Emacs functions. --- hact.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hact.el b/hact.el index a3b45e8e..342dd8a4 100644 --- a/hact.el +++ b/hact.el @@ -314,13 +314,11 @@ TYPE and TYPE-CATEGORY are both symbols. TYPE-CATEGORY must be one of (eq (car function) 'autoload)) (error "(action:commandp): Autoload not supported: %s" function)) (t function)))) - (cond ((and action (fboundp 'interactive-form)) + (cond (action (interactive-form action)) ((byte-code-function-p action) - (cond ((fboundp 'compiled-function-interactive) - (compiled-function-interactive action)) - ((commandp action) - (list 'interactive (aref action 5))))) + (when (commandp action) + (list 'interactive (aref action 5)))) (t (commandp action))))) (defun action:create (param-list body) @@ -371,9 +369,7 @@ Autoloads action function if need be to get the parameter list." (error "(action:params): Autoload not supported: %s" action)) (t (car (cdr action))))) ((byte-code-function-p action) - (if (fboundp 'compiled-function-arglist) - (compiled-function-arglist action) - (action:params-emacs action))) + (action:params-emacs action)) ((symbolp action) (car (cdr (and (fboundp action) (hypb:indirect-function action))))) ((and (fboundp 'closurep) (closurep action)) From 18383917d16510631afddedf6b8bf564d814dca0 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:54:41 +0100 Subject: [PATCH 16/30] Use vc-print-root-log, defined since Emacs 24.1 * hib-social.el (git-reference): Use vc-print-root-log, defined since Emacs 24.1. --- hib-social.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hib-social.el b/hib-social.el index 4608a608..1adcbe46 100644 --- a/hib-social.el +++ b/hib-social.el @@ -829,7 +829,7 @@ no PROJECT value is provided, it defaults to the value of (when project-dir (setq project-dir (expand-file-name project-dir))) (cond ((and project-dir (file-readable-p project-dir) (file-directory-p project-dir)) (if reference - (if (and (equal ref-type "commits") (fboundp 'vc-print-root-log)) + (if (equal ref-type "commits") (let ((default-directory project-dir)) (vc-print-root-log)) ;; Display commit diffs in a help buffer From 7b0c4511e829363e6377f259f9e27f43f3f1b85a Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Wed, 18 Mar 2026 23:57:19 +0100 Subject: [PATCH 17/30] Use locate-dominating-file, defined before Emacs 28 * hib-social.el (hibtypes-git-find): Use locate-dominating-file, defined before Emacs 28. --- hib-social.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hib-social.el b/hib-social.el index 1adcbe46..588d03fd 100644 --- a/hib-social.el +++ b/hib-social.el @@ -886,8 +886,7 @@ Return nil if no match is found." (let (root) (cond ;; Try to find in current directory tree first... - ((and (fboundp 'locate-dominating-file) - (setq root (locate-dominating-file default-directory ".git")) + ((and (setq root (locate-dominating-file default-directory ".git")) (hibtypes-git-find-execute "find" root file))) ;; then in default project tree... ((and hibtypes-git-default-project From 3f4f76e4f0376a3a7fd0e50e5b27e969d0cb2419 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:02:59 +0100 Subject: [PATCH 18/30] Use get-text-property and gnus-article-press-button Defined at least since Emacs 28. Text property 'gnus-callback ensures gnus is loaded. * hibtypes.el (gnus-push-button): Use get-text-property and gnus-article-press-button. --- hibtypes.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hibtypes.el b/hibtypes.el index 7508cde0..bd416c59 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -1523,9 +1523,7 @@ documentation string is displayed." (defib gnus-push-button () "Activate GNUS-specific article push-buttons, e.g. for hiding signatures. GNUS is a news and mail reader." - (and (fboundp 'get-text-property) - (fboundp 'gnus-article-press-button) - (get-text-property (point) 'gnus-callback) + (and (get-text-property (point) 'gnus-callback) (let* ((but (button-at (point))) (but-start (when but (button-start but))) (but-end (when but (button-end but)))) From fcaa51f89581113aa8cd64d1714a03bb057c1944 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:21:57 +0100 Subject: [PATCH 19/30] Use outline-minor-mode, defined since Emacs 19.1 * hmoccur.el (moccur): * hui.el (hui:ebut-search): Use outline-minor-mode, defined since Emacs 19.1. --- hmoccur.el | 7 +++---- hui.el | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hmoccur.el b/hmoccur.el index 61f5899a..6243ca18 100644 --- a/hmoccur.el +++ b/hmoccur.el @@ -144,10 +144,9 @@ With optional NO-FOLD-SEARCH non-nil do case sensitive search. (progn (set-buffer occbuf) (moccur-mode) - (if (fboundp 'outline-minor-mode) - (and (progn (goto-char 1) - (search-forward "\C-m" nil t)) - (outline-minor-mode 1))) + (and (progn (goto-char 1) + (search-forward "\C-m" nil t)) + (outline-minor-mode 1)) (goto-char (point-min)) (pop-to-buffer occbuf) (message "%d matches." matches) diff --git a/hui.el b/hui.el index e5f200ef..48ecd8c9 100644 --- a/hui.el +++ b/hui.el @@ -684,10 +684,9 @@ a menu to find any of the occurrences." (progn (set-buffer out-buf) (moccur-mode) - (when (fboundp 'outline-minor-mode) - (and (progn (goto-char 1) - (search-forward "\C-m" nil t)) - (outline-minor-mode 1))) + (and (progn (goto-char 1) + (search-forward "\C-m" nil t)) + (outline-minor-mode 1)) (when (fboundp 'hproperty:but-create) (hproperty:but-create (regexp-quote (if match-part From 81ad41f7ae4ae1b37b734b5701636c42c4043b1e Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:25:54 +0100 Subject: [PATCH 20/30] Use mouse-drag-frame-move, defined since Emacs 28 * hmouse-drv.el (mouse-drag-mode-line): Use mouse-drag-frame-move, defined since Emacs 28. --- hmouse-drv.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index 6edac902..08d2f6ac 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -1022,9 +1022,7 @@ frame instead." ((and (frame-parameter frame 'drag-with-mode-line) (window-at-side-p window 'bottom)) ;; Drag frame when the window is on the bottom of its frame. - (if (fboundp 'mouse-drag-frame-move) ;; From Emacs 28 - (mouse-drag-frame-move start-event) - (mouse-drag-frame start-event 'move)))))) + (mouse-drag-frame-move start-event))))) (defun hkey-debug (pred pred-value hkey-action) "Display a message with the context and values from Smart Key activation." From c0333977da51b5715f84aacbb6077902ea7506a4 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:29:03 +0100 Subject: [PATCH 21/30] Use frame-list-z-order, defined since Emacs 26.1 * hmouse-drv.el (hmouse-window-at-absolute-pixel-position): Use frame-list-z-order, defined since Emacs 26.1. --- hmouse-drv.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index 08d2f6ac..b1235e35 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -1530,9 +1530,7 @@ the position (not below another application's window)." ;; 26 and above. For prior versions, the ordering of the frames ;; returned is not guaranteed, so the frame whose window is returned ;; may not be the uppermost. - (let* ((top-to-bottom-frames (if (fboundp 'frame-list-z-order) - (frame-list-z-order) - (frame-list))) + (let* ((top-to-bottom-frames (frame-list-z-order)) (pos-x (car position)) (pos-y (cdr position)) edges left top right bottom From 4ad4320cf6b8d0dc5350a3bbbc395a528f9c001f Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:34:35 +0100 Subject: [PATCH 22/30] Use find-library, defined since Emacs 25.2 * hmouse-tag.el (smart-lisp): (smart-lisp-at-known-identifier-p): Use find-library, defined since Emacs 25.2. --- hmouse-tag.el | 84 +++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/hmouse-tag.el b/hmouse-tag.el index 11a1b89d..639e9b6b 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -667,36 +667,36 @@ pressed in an appropriate buffer and has moved the cursor to the selected buffer." (interactive) - (unless (and (fboundp 'find-library) - ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. - (let ((opoint (point)) - type - name - lib) - (setq lib (and (search-backward "\(" nil t) - (or - ;; load with a filename - (looking-at "(\\(load\\)[ \t]+\\(\\)\"\\([^][() \t\n\r`'\"]+\\)") - ;; autoload or require with a name and filename - (looking-at "(\\(autoload\\|require\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)[ \t\n\r]+\"\\([^][() \t\n\r`'\"]+\\)") - ;; require without a separate filename - (looking-at "(\\(require\\)\\(\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)")))) - (goto-char opoint) - (when lib - (setq type (match-string-no-properties 1) - name (match-string-no-properties 2) - lib (match-string-no-properties 3)) - (hpath:display-buffer (current-buffer)) - (find-library lib) - (goto-char (point-min)) - (when (equal type "autoload") - ;; Ignore defgroup matches - (if (re-search-forward - (format "^[; \t]*(def.[^r][^ \t\n\r]*[ \t]+%s[ \t\n\r]" (regexp-quote name)) - nil t) - (goto-char (match-beginning 0)) - (error "(smart-lisp): Found autoload library but no definition for `%s'" name))) - t))) + (unless + ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. + (let ((opoint (point)) + type + name + lib) + (setq lib (and (search-backward "\(" nil t) + (or + ;; load with a filename + (looking-at "(\\(load\\)[ \t]+\\(\\)\"\\([^][() \t\n\r`'\"]+\\)") + ;; autoload or require with a name and filename + (looking-at "(\\(autoload\\|require\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)[ \t\n\r]+\"\\([^][() \t\n\r`'\"]+\\)") + ;; require without a separate filename + (looking-at "(\\(require\\)\\(\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)")))) + (goto-char opoint) + (when lib + (setq type (match-string-no-properties 1) + name (match-string-no-properties 2) + lib (match-string-no-properties 3)) + (hpath:display-buffer (current-buffer)) + (find-library lib) + (goto-char (point-min)) + (when (equal type "autoload") + ;; Ignore defgroup matches + (if (re-search-forward + (format "^[; \t]*(def.[^r][^ \t\n\r]*[ \t]+%s[ \t\n\r]" (regexp-quote name)) + nil t) + (goto-char (match-beginning 0)) + (error "(smart-lisp): Found autoload library but no definition for `%s'" name))) + t)) (smart-lisp-find-tag nil show-doc))) (defun smart-lisp-find-tag (&optional tag show-doc) @@ -1256,18 +1256,18 @@ This indicates that TAG is serving as a hyperlink button." The Lisp identifier is either listed in a tags table or is a known Emacs Lisp identifier." (interactive) - (unless (and (fboundp 'find-library) - ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. - (let ((lib) - (opoint (point))) - (setq lib (and (re-search-backward "[()]" nil t) - (looking-at (concat - "(\\(require\\|load\\|autoload\\)" - "[ \t]+.*['\"]" - "\\([^][() \t\n\r`'\"]+\\)")))) - (goto-char opoint) - (when lib - (ignore-errors (and (find-library-name lib) t))))) + (unless + ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. + (let ((lib) + (opoint (point))) + (setq lib (and (re-search-backward "[()]" nil t) + (looking-at (concat + "(\\(require\\|load\\|autoload\\)" + "[ \t]+.*['\"]" + "\\([^][() \t\n\r`'\"]+\\)")))) + (goto-char opoint) + (when lib + (ignore-errors (and (find-library-name lib) t)))) ;; Cache tag value (setq hkey-value (smart-lisp-at-tag-p t)) (let* ((tag hkey-value) From 454116ef1a8d6f85a901f012605e2aaaf5c25bbc Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 00:37:35 +0100 Subject: [PATCH 23/30] Use find-function-noselect, defined before Emacs 28 * hmouse-tag.el (smart-lisp-find-tag): (smart-lisp-at-known-identifier-p): Use find-function-noselect, defined before Emacs 28. --- hmouse-tag.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmouse-tag.el b/hmouse-tag.el index 639e9b6b..541a601a 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -726,7 +726,7 @@ Use `hpath:display-buffer' to show definition or documentation." ;; Ignore unbound symbols if displaying doc. (t nil))) - ((and elisp-flag (fboundp 'find-function-noselect) + ((and elisp-flag (let ((result (smart-lisp-bound-symbol-def tag-sym))) (when (and (cdr result) (hpath:display-buffer (car result))) @@ -1274,7 +1274,7 @@ known Emacs Lisp identifier." (tag-sym (intern-soft tag))) (cond ((and (fboundp 'ert-test-boundp) (ert-test-boundp tag-sym)) tag) - ((when (and (fboundp 'find-function-noselect) tag-sym) + ((when tag-sym (let ((result (smart-lisp-bound-symbol-def tag-sym))) (when (cdr result) tag)))) From 5d76de3ee2d95368dddddb1107b9b92092debc37 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 17:16:18 +0100 Subject: [PATCH 24/30] Use reveal-hide-revealed, defined since Emacs 28.1 Used in hyrolo after requiring reveal. * hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, defined since Emacs 28.1. --- hyrolo.el | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hyrolo.el b/hyrolo.el index c3a517c2..24465a1b 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -3642,15 +3642,6 @@ revealed text manually." :type 'boolean :version "28.1")) -(unless (fboundp 'reveal-hide-revealed) -(defun reveal-hide-revealed () - "Hide all revealed text. -If there is revealed text under point, this command does not hide -that text." - (interactive) - (let ((reveal-auto-hide t)) - (reveal-post-command)))) - (defun hyrolo-reveal-open-new-overlays (old-ols) (let ((repeat t)) (while repeat From e5410e011abfc06219062b0353befa1f5ff71f27 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 17:19:29 +0100 Subject: [PATCH 25/30] Use reveal-auto-hide, defined since Emacs 28.1 Used in hyrolo after requiring reveal. * hyrolo.el (reveal-auto-hide): Use reveal-auto-hide, defined since Emacs 28.1. --- hyrolo.el | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hyrolo.el b/hyrolo.el index 24465a1b..f6c3bc49 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -134,7 +134,6 @@ (defvar org-link--link-folding-spec) (defvar org-roam-directory) (defvar plstore-cache-passphrase-for-symmetric-encryption) -(defvar reveal-auto-hide) ;;; ************************************************************************ ;;; Public variables @@ -3634,14 +3633,6 @@ Also see the `reveal-auto-hide' variable." :keymap nil nil) ;; Make this a no-op until can debug `reveal-mode' in *HyRolo* buffer -(unless (boundp 'reveal-auto-hide) -(defcustom reveal-auto-hide t - "Automatically hide revealed text when leaving it. -If nil, the `reveal-hide-revealed' command can be useful to hide -revealed text manually." - :type 'boolean - :version "28.1")) - (defun hyrolo-reveal-open-new-overlays (old-ols) (let ((repeat t)) (while repeat From 6fdda28b57afa0678c8109cfc2eda46e676b4f92 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 19:11:18 +0100 Subject: [PATCH 26/30] locate-data-file is not an Emacs function The function comes likely from old XEmacs supports since it is defined in XEmacs. * hypb.el (hypb:insert-hyperbole-banner): Do not check for locate-data-file, not an Emacs function. --- hypb.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hypb.el b/hypb.el index 97af5d44..7b0ad328 100644 --- a/hypb.el +++ b/hypb.el @@ -1382,10 +1382,8 @@ If FILE is not an absolute path, expand it relative to `hyperb:dir'." Without file, the banner is prepended to the current buffer." (let ((hyperbole-banner-path (expand-file-name "hyperbole-banner.png" hyperb:dir))) (unless (file-readable-p hyperbole-banner-path) - (setq hyperbole-banner-path (if (fboundp 'locate-data-file) - (locate-data-file "hyperbole-banner.png") - (expand-file-name "hyperbole-banner.png" - data-directory)))) + (setq hyperbole-banner-path (expand-file-name "hyperbole-banner.png" + data-directory))) (if (or (not (fboundp 'create-image)) (not (display-graphic-p)) (let ((button (next-button (point-min)))) From 57769b43ac5d01158787034746d0c89f0ed0f08b Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Thu, 19 Mar 2026 19:30:28 +0100 Subject: [PATCH 27/30] Use mail-fetch-field, defined before Emacs 28 * hyrolo.el (hyrolo-add): Use mail-fetch-field, defined before Emacs 28. --- hyrolo.el | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/hyrolo.el b/hyrolo.el index f6c3bc49..aaec7093 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -376,19 +376,16 @@ With prefix argument, prompts for optional FILE to add entry within. NAME may be of the form: parent/child to insert child below a parent entry which begins with the parent string." (interactive - (progn - (unless (fboundp 'mail-fetch-field) - (require 'mail-utils)) - (let* ((lst (hyrolo-name-and-email)) - (name (car lst)) - (email (car (cdr lst))) - (entry (read-string "Name to add to rolo: " - (or name email)))) - (list (if (and email name - (string-match (concat "\\`" (regexp-quote entry)) name)) - (format hyrolo-email-format entry email) - entry) - current-prefix-arg)))) + (let* ((lst (hyrolo-name-and-email)) + (name (car lst)) + (email (car (cdr lst))) + (entry (read-string "Name to add to rolo: " + (or name email)))) + (list (if (and email name + (string-match (concat "\\`" (regexp-quote entry)) name)) + (format hyrolo-email-format entry email) + entry) + current-prefix-arg))) (when (or (not (stringp name)) (string-equal name "")) (error "(hyrolo-add): Invalid name: `%s'" name)) (when (and (called-interactively-p 'interactive) file) From 5e429e73e6525477a701e718b43ac064f881bf49 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sun, 29 Mar 2026 17:04:04 +0200 Subject: [PATCH 28/30] Review comment, keep check for gnus-article-press-button --- hibtypes.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hibtypes.el b/hibtypes.el index bd416c59..3d97f9f1 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -1523,7 +1523,8 @@ documentation string is displayed." (defib gnus-push-button () "Activate GNUS-specific article push-buttons, e.g. for hiding signatures. GNUS is a news and mail reader." - (and (get-text-property (point) 'gnus-callback) + (and (fboundp 'gnus-article-press-button) + (get-text-property (point) 'gnus-callback) (let* ((but (button-at (point))) (but-start (when but (button-start but))) (but-end (when but (button-end but)))) From bd7a995c47e0458ef128dd4e48c8be339c73ab0c Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sun, 29 Mar 2026 17:18:58 +0200 Subject: [PATCH 29/30] Add ChanegLog --- ChangeLog | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/ChangeLog b/ChangeLog index f1c201b7..10dc9533 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,71 @@ +2026-03-29 Mats Lidell + +* hproperty.el: Remove defalias of display-color-p, defined since + Emacs 21.1 + +* hsys-flymake.el (flymake-mode-hook): Use repeat-mode, defined since + Emacs 28.1. + +* hui-mouse.el (hkey-alist): Use button-at, defined in Emacs before + version 28. + (smart-dired): Use dired-do-flagged-delete, defined since before Emacs 28. + +* hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1. + +* htz.el (htz:zone-to-hour): Use current-time-zone, defined in Emacs 25.1 + +* hui-window.el (assist-key-modeline-click-left-edge): Use last, + defined before Emacs 28. + (hmouse-horizontal-action-drag): Use split-window-vertically. + (smart-coords-in-window-p): Use window-edges, defined before Emacs 28. + +* hinit.el (hyperb:check-dir-user): Use make-directory, defined since + Emacs 19.34. + +* hmouse-info.el (smart-info): Use Info-next and mouse-event-p. + (smart-info-assist): Use Info-prev and mouse-event-p. + +* hycontrol.el (hycontrol-windows-mode-map): Use text-scale-increase + and text-scale-decrease. + +* hui-select.el (hui-select-thing): Use use-region-p, defined since + Emacs 23.1. + +* hypb.el (hypb:hkey-help-file): Do not check for locate-data-file, it + is not an Emacs function. + (hypb:insert-hyperbole-banner): Do not check for locate-data-file, not + an Emacs function. + +* hact.el (action:commandp): Do not use compiled-function-interactive. + (action:params): Do not use compiled-function-arglist. Not Emacs + functions. + +* hib-social.el (git-reference): Use vc-print-root-log, defined since + Emacs 24.1. + (hibtypes-git-find): Use locate-dominating-file, defined before Emacs 28. + +* hibtypes.el (gnus-push-button): Use get-text-property. + +* hmoccur.el (moccur): + hui.el (hui:ebut-search): Use outline-minor-mode, defined since Emacs 19.1. + +* hmouse-drv.el (mouse-drag-mode-line): Use mouse-drag-frame-move, + defined since Emacs 28. + (hmouse-window-at-absolute-pixel-position): Use frame-list-z-order, + defined since Emacs 26.1. + +* hmouse-tag.el (smart-lisp): + (smart-lisp-at-known-identifier-p): Use find-library, defined since + Emacs 25.2. + (smart-lisp-find-tag): + (smart-lisp-at-known-identifier-p): Use find-function-noselect, + defined before Emacs 28. + +* hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, defined + since Emacs 28.1. + (reveal-auto-hide): Use reveal-auto-hide, defined since Emacs 28.1. + (hyrolo-add): Use mail-fetch-field, defined before Emacs 28. + 2026-03-28 Bob Weiner * hypb.el (hypb:sqlite-p): Add to return non-nil when Emacs supports sqlite. From bed96c420edd52b3ffd79246bbd1a009900d63f6 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sun, 29 Mar 2026 17:23:56 +0200 Subject: [PATCH 30/30] Review comment, remove empty lines in ChangeLog --- ChangeLog | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10dc9533..e00dba41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,66 +2,49 @@ * hproperty.el: Remove defalias of display-color-p, defined since Emacs 21.1 - -* hsys-flymake.el (flymake-mode-hook): Use repeat-mode, defined since + hsys-flymake.el (flymake-mode-hook): Use repeat-mode, defined since Emacs 28.1. - -* hui-mouse.el (hkey-alist): Use button-at, defined in Emacs before + hui-mouse.el (hkey-alist): Use button-at, defined in Emacs before version 28. (smart-dired): Use dired-do-flagged-delete, defined since before Emacs 28. - -* hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1. - -* htz.el (htz:zone-to-hour): Use current-time-zone, defined in Emacs 25.1 - -* hui-window.el (assist-key-modeline-click-left-edge): Use last, + hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1. + htz.el (htz:zone-to-hour): Use current-time-zone, defined in Emacs 25.1 + hui-window.el (assist-key-modeline-click-left-edge): Use last, defined before Emacs 28. (hmouse-horizontal-action-drag): Use split-window-vertically. (smart-coords-in-window-p): Use window-edges, defined before Emacs 28. - -* hinit.el (hyperb:check-dir-user): Use make-directory, defined since + hinit.el (hyperb:check-dir-user): Use make-directory, defined since Emacs 19.34. - -* hmouse-info.el (smart-info): Use Info-next and mouse-event-p. + hmouse-info.el (smart-info): Use Info-next and mouse-event-p. (smart-info-assist): Use Info-prev and mouse-event-p. - -* hycontrol.el (hycontrol-windows-mode-map): Use text-scale-increase + hycontrol.el (hycontrol-windows-mode-map): Use text-scale-increase and text-scale-decrease. - -* hui-select.el (hui-select-thing): Use use-region-p, defined since + hui-select.el (hui-select-thing): Use use-region-p, defined since Emacs 23.1. - -* hypb.el (hypb:hkey-help-file): Do not check for locate-data-file, it + hypb.el (hypb:hkey-help-file): Do not check for locate-data-file, it is not an Emacs function. (hypb:insert-hyperbole-banner): Do not check for locate-data-file, not an Emacs function. - -* hact.el (action:commandp): Do not use compiled-function-interactive. + hact.el (action:commandp): Do not use compiled-function-interactive. (action:params): Do not use compiled-function-arglist. Not Emacs functions. - -* hib-social.el (git-reference): Use vc-print-root-log, defined since + hib-social.el (git-reference): Use vc-print-root-log, defined since Emacs 24.1. (hibtypes-git-find): Use locate-dominating-file, defined before Emacs 28. - -* hibtypes.el (gnus-push-button): Use get-text-property. - -* hmoccur.el (moccur): + hibtypes.el (gnus-push-button): Use get-text-property. + hmoccur.el (moccur): hui.el (hui:ebut-search): Use outline-minor-mode, defined since Emacs 19.1. - -* hmouse-drv.el (mouse-drag-mode-line): Use mouse-drag-frame-move, + hmouse-drv.el (mouse-drag-mode-line): Use mouse-drag-frame-move, defined since Emacs 28. (hmouse-window-at-absolute-pixel-position): Use frame-list-z-order, defined since Emacs 26.1. - -* hmouse-tag.el (smart-lisp): + hmouse-tag.el (smart-lisp): (smart-lisp-at-known-identifier-p): Use find-library, defined since Emacs 25.2. (smart-lisp-find-tag): (smart-lisp-at-known-identifier-p): Use find-function-noselect, defined before Emacs 28. - -* hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, defined + hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, defined since Emacs 28.1. (reveal-auto-hide): Use reveal-auto-hide, defined since Emacs 28.1. (hyrolo-add): Use mail-fetch-field, defined before Emacs 28.