Remove fboundp checks for functions found in Emacs 28.2#922
Merged
Conversation
display-color-p has been defined since Emacs 21.1. * 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.
* hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1.
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.
* 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.
* hinit.el (hyperb:check-dir-user): Use make-directory, defined since Emacs 19.34.
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.
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.
C source code function defined long before Emacs 28 * hui-window.el (smart-coords-in-window-p): Use window-edges, defined before Emacs 28.
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.
* hui-select.el (hui-select-thing): Use use-region-p, defined since Emacs 23.1.
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.
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.
* hib-social.el (git-reference): Use vc-print-root-log, defined since Emacs 24.1.
* hib-social.el (hibtypes-git-find): Use locate-dominating-file, defined before Emacs 28.
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.
* 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-drv.el (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.
* hmouse-tag.el (smart-lisp-find-tag): (smart-lisp-at-known-identifier-p): Use find-function-noselect, defined before Emacs 28.
Used in hyrolo after requiring reveal. * hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, 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.
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.
* hyrolo.el (hyrolo-add): Use mail-fetch-field, defined before Emacs 28.
27bd622 to
57769b4
Compare
rswgnu
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remove code and checks not needed now since we only support Emacs 28.2
going forward.
and gnus-article-press-buttonWhy
Not needed fboundp checks makes the code harder to read and
understand.
Since we require at least Emacs 28.2 we can safely drop checking for
functions that has been defined since then and for checking for and
calling functions that was never part of Emacs 28.2 or even never was
part of Emacs. The later due to historical support for XEmacs.
Note
Each change is in its own commit so it is easy to remove if review
tells my analysis it wrong. The trickiest cases are a few for symbols
that are not pre- or autoloaded but is used in a context where it must
have been loaded.
To help the review see this gist
where each symbol is checked in Emacs 28.2 for fboundp, preload, and
autoload. The docstring is also there which for some symbols tell when
it was introduced.
Text in square brackets with the form [Comment: ...] is additional
info added by me.