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

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

[elpa] externals-release/org 0e7153e: org-test: Fix wrong-numbre-of-argu


From: ELPA Syncer
Subject: [elpa] externals-release/org 0e7153e: org-test: Fix wrong-numbre-of-arguments error on master+native-comp
Date: Sun, 2 May 2021 05:57:12 -0400 (EDT)

branch: externals-release/org
commit 0e7153e63d20032d35dde1626004c86ba3fcf2c1
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Bastien <bzg@gnu.org>

    org-test: Fix wrong-numbre-of-arguments error on master+native-comp
    
    * testing/org-test.el (org-test-at-time): Use correct number of
    arguments in 'decode-time cl-letf binding. `decode-time' accepts up to
    3 arguments on master.
    
    The wrong-numbre-of-arguments error is raised on Emacs master
    configured with native-comp support when running make test on Org mode
    master.  Native-comp modifies function calls with optional arguments
    in the way that omitted arguments are still provided as `nil'.  For
    example, `decode-time' called as (decode-time time) in lisp source may
    be compiled into (decode-time time nil nil) call by native-compiler.
    If redefined `decode-time' does not accept 3 arguments, it result in
    error.
    
    See Emacs bug#48133.
---
 testing/org-test.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/org-test.el b/testing/org-test.el
index 6904e16..27dd0dd 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -457,8 +457,8 @@ TIME can be a non-nil Lisp time value, or a string 
specifying a date and time."
               (apply ,(symbol-function 'current-time-zone)
                      (or time ,at) args)))
            ((symbol-function 'decode-time)
-            (lambda (&optional time) (funcall ,(symbol-function 'decode-time)
-                                              (or time ,at))))
+            (lambda (&optional time zone form) (funcall ,(symbol-function 
'decode-time)
+                                                   (or time ,at) zone form)))
            ((symbol-function 'encode-time)
             (lambda (time &rest args)
               (apply ,(symbol-function 'encode-time) (or time ,at) args)))



reply via email to

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