emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org d240386c10: org-diary-sexp-entry: Re-use cached nil


From: ELPA Syncer
Subject: [elpa] externals/org d240386c10: org-diary-sexp-entry: Re-use cached nil return values
Date: Fri, 23 Sep 2022 01:57:45 -0400 (EDT)

branch: externals/org
commit d240386c106b8191f9365038384626050bfccfe4
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-diary-sexp-entry: Re-use cached nil return values
    
    * lisp/org.el (org-diary-sexp-entry): Do not consider cached nil
    return values as if they are not cached.
---
 lisp/org.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4723ab6119..142d5451b3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14433,7 +14433,8 @@ D may be an absolute day number, or a calendar-type 
list (month day year)."
   (require 'diary-lib)
   ;; `org-anniversary' and alike expect ENTRY and DATE to be bound
   ;; dynamically.
-  (or (gethash (list sexp entry d) org--diary-sexp-entry-cache)
+  (let ((cached (gethash (list sexp entry d) org--diary-sexp-entry-cache 
'none)))
+    (if (not (eq 'none cached)) cached
       (puthash (list sexp entry d)
                (let* ((sexp `(let ((entry ,entry)
                                   (date ',d))
@@ -14458,7 +14459,7 @@ D may be an absolute day number, or a calendar-type 
list (month day year)."
                             (stringp (car result)))
                        result)
                       (result entry)))
-               org--diary-sexp-entry-cache)))
+               org--diary-sexp-entry-cache))))
 
 (defun org-diary-to-ical-string (frombuf)
   "Get iCalendar entries from diary entries in buffer FROMBUF.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]