1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Fix "Variable binding depth exceeds max-specpdl-size"

* lisp/org-persist.el (org-persist-register): Fix `add-hook' args.

Reported in:
https://list.orgmode.org/8735ouxz6y.fsf@yandex.com/
https://list.orgmode.org/1012598.1634829727@apollo2.minshall.org/T/#u
This commit is contained in:
Ihor Radchenko 2021-10-21 23:58:03 +08:00
parent 79971b748d
commit 5315773e8a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -131,7 +131,7 @@ dependency means that data shared between variables will be preserved
(cons var (plist-get inherited-index :variable)))))))
(org-persist--get-index var buffer)
(when buffer
(add-hook 'kill-buffer-hook #'org-persist-write-all-buffer 'local)))
(add-hook 'kill-buffer-hook #'org-persist-write-all-buffer nil 'local)))
(defun org-persist-unregister (var &optional buffer)
"Unregister VAR in BUFFER to be persistent.