File 9520-Remove-unnecessary-fboundp-check-for-add-function.patch of Package erlang
From 7c90a83b8672eebc08fcffac831b21655da5fc10 Mon Sep 17 00:00:00 2001
From: Bozhidar Batsov <bozhidar@batsov.dev>
Date: Fri, 20 Mar 2026 13:34:53 +0200
Subject: [PATCH 10/17] Remove unnecessary fboundp check for add-function
add-function has been available since Emacs 24.4, so the guard
is unnecessary with Emacs 27+ as the minimum.
---
lib/tools/emacs/erlang.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 1abb860450..a52dcd5728 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -1437,7 +1437,7 @@ Other commands:
(erlang-font-lock-init)
(erlang-skel-init)
(tempo-use-tag-list 'erlang-tempo-tags)
- (when (and (fboundp 'add-function) (fboundp 'erldoc-eldoc-function))
+ (when (fboundp 'erldoc-eldoc-function)
(or eldoc-documentation-function
(setq-local eldoc-documentation-function #'ignore))
(add-function :before-until (local 'eldoc-documentation-function)
--
2.51.0