From 3ff527d6c2eb004074a9e8788d9b44eaae8c850a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 8 Sep 2023 14:55:50 +0200 Subject: Simplify buffer-local-boundp --- compat-28.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/compat-28.el b/compat-28.el index 7081e33..f878538 100644 --- a/compat-28.el +++ b/compat-28.el @@ -354,11 +354,10 @@ REPLACEMENT can use the following special elements: (compat-defun buffer-local-boundp (symbol buffer) ;; "Return non-nil if SYMBOL is bound in BUFFER. Also see `local-variable-p'." - (catch 'fail - (condition-case nil - (buffer-local-value symbol buffer) - (void-variable nil (throw 'fail nil))) - t)) + (condition-case nil + (progn (buffer-local-value symbol buffer) + t) + (void-variable nil))) (compat-defmacro with-existing-directory (&rest body) ;; "Execute BODY with `default-directory' bound to an existing directory. -- cgit v1.0