mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
Compatibility: define sha1-string for Emacs 22.
This commit is contained in:
parent
627eaa32e6
commit
e083a14086
@ -319,7 +319,12 @@ that can be added."
|
||||
(setq n (1- n)))
|
||||
n))
|
||||
|
||||
|
||||
(defun org-sha1-string (s &optional binary)
|
||||
(if (fboundp 'sha1-string)
|
||||
(sha1-string s binary)
|
||||
(with-temp-buffer
|
||||
(insert s)
|
||||
(sha1-region (point-min) (point-max) binary))))
|
||||
|
||||
(provide 'org-compat)
|
||||
|
||||
|
@ -306,7 +306,8 @@ it can be a list structured like an entry in `org-feed-alist'."
|
||||
(push e new)
|
||||
(setq olds (nth 2 (assoc (plist-get e :guid) old-status)))
|
||||
(if (and olds
|
||||
(not (string= (sha1-string (plist-get e :item-full-text))
|
||||
(not (string= (org-sha1-string
|
||||
(plist-get e :item-full-text))
|
||||
olds)))
|
||||
(push e changed))))
|
||||
|
||||
@ -339,7 +340,7 @@ it can be a list structured like an entry in `org-feed-alist'."
|
||||
;; or if they were handled previously
|
||||
(if (assoc guid guid-alist) t (plist-get e :handled))
|
||||
;; A hash, to detect changes
|
||||
(sha1-string (plist-get e :item-full-text))))
|
||||
(org-sha1-string (plist-get e :item-full-text))))
|
||||
entries))
|
||||
|
||||
;; Handle new items in the feed
|
||||
|
Loading…
Reference in New Issue
Block a user