[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 0cb0760206 1/2: org-persist-write:elisp: Do not use
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 0cb0760206 1/2: org-persist-write:elisp: Do not use `buffer-local-boundp' |
Date: |
Mon, 14 Feb 2022 08:57:47 -0500 (EST) |
branch: externals/org
commit 0cb0760206e4deb89f12d1553d8e66857a5fdb21
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-persist-write:elisp: Do not use `buffer-local-boundp'
* lisp/org-persist.el (org-persist-write:elisp): Use manual
implementation of `buffer-local-boundp' to make things work in Emacs
<28.
Reported in https://list.orgmode.org/87k0dyqy3d.fsf@kyleam.com/T/#u
---
lisp/org-persist.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index de50c6aa09..3b6a2d330a 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -614,8 +614,11 @@ COLLECTION is the plist holding data collectin."
(if (and (plist-get (plist-get collection :associated) :file)
(get-file-buffer (plist-get (plist-get collection :associated)
:file)))
(let ((buf (get-file-buffer (plist-get (plist-get collection
:associated) :file))))
- (when (buffer-local-boundp (cadr container) buf)
- (buffer-local-value (cadr container) buf)))
+ ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28.
+ ;; Not using it yet to keep backward compatibility.
+ (condition-case nil
+ (buffer-local-value (cadr container) buf)
+ (void-variable nil)))
(when (boundp (cadr container))
(symbol-value (cadr container)))))