org-persist: Support old Emacs without file-attribute-inode-number
* lisp/org-persist.el (org-persist--get-index): Check is `file-attribute-inode-number' function exists. It was not there in Emacs 25. Fixes https://list.orgmode.org/CAJcAo8s21R1dRrxpaHV=h68RtWctLd6giFskw1vpt9fQh81dDw@mail.gmail.com/T/#u
This commit is contained in:
parent
344b99070f
commit
0b670aa8e8
|
@ -94,7 +94,9 @@ When BUFFER is nil, return plist for global VAR."
|
|||
(org-persist--read-index)
|
||||
(let* ((buffer-file (when buffer (buffer-file-name (or (buffer-base-buffer buffer)
|
||||
buffer))))
|
||||
(inode (when buffer-file (file-attribute-inode-number (file-attributes buffer-file))))
|
||||
(inode (when buffer-file
|
||||
(and (fboundp 'file-attribute-inode-number)
|
||||
(file-attribute-inode-number (file-attributes buffer-file)))))
|
||||
(buffer-hash (when buffer (secure-hash 'md5 buffer))))
|
||||
(let ((result (seq-find (lambda (plist)
|
||||
(and (or (memq var (plist-get plist :variable))
|
||||
|
|
Loading…
Reference in New Issue