Emergency PR: Avoid breakage on emacs < 29.1 #10
Merged
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.
A PR that I wrote was recently merged, but has caused problems for anyone using
bind-map
with emacs < 29.1.The problem is in order to find aliased modes, I used
function-alias-p
, but this is only available in emacs 29.1+. As a result, anyone with emacs < 29.1 who is using the new version of emacs will get a cryptic error aboutSymbol's function definition is void: function-alias-p
. My bad! :(Handling aliased modes is important, because this is how AUCTeX remaps its modes in older versions of emacs (where
major-mode-remap-alist
is not available). However, while I/we try to add this functionality tobind-map
, I wanted to fix my mistake and at least makebind-map
work on older versions of emacs.This PR just adds some logic to ensure that
function-alias-p
is available before trying to use it. If this looks cursorily good, I hope we can get it adopted ASAP so that it can make its way to MELPA.