diff options
| author | Mattias EngdegÄrd <mattiase@acm.org> | 2023-09-08 14:55:50 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-09-08 17:22:17 +0200 |
| commit | 3ff527d6c2eb004074a9e8788d9b44eaae8c850a (patch) | |
| tree | 8968524c8f7e39b4487a6d3c111fce4f16e8963b | |
| parent | 4c45789d9b1a8df0bf3fc2b258dd54b06d3b26b7 (diff) | |
Simplify buffer-local-boundp
| -rw-r--r-- | compat-28.el | 9 |
1 files 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) ;; <compat-tests:buffer-local-boundp> "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) ;; <compat-tests:with-existing-directory> "Execute BODY with `default-directory' bound to an existing directory. |
