Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emergency PR: Avoid breakage on emacs < 29.1 #10

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bind-map.el
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,16 @@ If both are nil, just return `mode'. If
`bind-map-use-remapped-modes' is non-nil, also return mode to
which it has been remapped in `major-mode-remap-alist' (if
applicable). If `bind-map-use-aliased-modes' is non-nil, also
return any modes for which `mode' is an alias (if applicable)."
return any modes for which `mode' is an alias (if applicable).
Note: finding aliased modes relies on `function-alias-p', which
is only available on Emacs 29.1+."
(let ((r-mode
(or (and bind-map-use-remapped-modes
(boundp 'major-mode-remap-alist)
(alist-get mode major-mode-remap-alist))))
(a-modes (and bind-map-use-aliased-modes (function-alias-p mode))))
(a-modes (and bind-map-use-aliased-modes
(fboundp 'function-alias-p)
(function-alias-p mode))))
(delq nil (append (list mode r-mode) a-modes))))

(defun bind-map-add-to-major-mode-list (activate-var major-mode-list)
Expand Down