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

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

[elpa] externals-release/org ac73e594c9 1/5: Replace use of if-let and w


From: ELPA Syncer
Subject: [elpa] externals-release/org ac73e594c9 1/5: Replace use of if-let and when-let, obsolete in Emacs 31.0.50
Date: Fri, 1 Nov 2024 22:08:21 -0400 (EDT)

branch: externals-release/org
commit ac73e594c9286587c68f13e18c56860f8eca9902
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Sean Whitton <spwhitton@spwhitton.name>

    Replace use of if-let and when-let, obsolete in Emacs 31.0.50
    
    * lisp/ob-R.el (org-babel-R-associate-session):
    * lisp/ob-clojure.el (ob-clojure-nbb-command, ob-clojure-cli-command):
    * lisp/ob-core.el (org-babel-execute-src-block):
    * lisp/ob-exp.el (org-babel-exp-code):
    * lisp/ob-julia.el (org-babel-julia-associate-session):
    * lisp/ob-python.el
    (org-babel-python--python-util-comint-end-of-output-p):
    * lisp/ol.el (org-insert-link):
    * lisp/org-attach.el (org-attach):
    * lisp/org-clock.el (org-clock-select-task):
    * lisp/org-compat.el (fboundp):
    * lisp/org-element-ast.el (org-element-property-raw)
    (org-element-put-property, org-element-copy):
    * lisp/org-element.el (org-element-timestamp-interpreter)
    (org-element--cache-key):
    * lisp/org-goto.el (org-goto-location):
    * lisp/org-lint.el (org-lint-suspicious-language-in-src-block)
    (org-lint-export-option-keywords):
    * lisp/org-macs.el (org-mks):
    * lisp/org-persist.el: (org-persist-write:elisp):
    * lisp/org-table.el (org-table-fedit-finish):
    * lisp/org.el (org-entry-get-with-inheritance):
    * lisp/ox-html.el (org-html--reference, org-html--build-mathjax-config)
    (org-html-example-block):
    * lisp/ox-latex.el (org-latex-table-row):
    * lisp/ox.el (org-export--prune-tree)
    (org-export--blindly-expand-include):
    * testing/lisp/test-duplicates-detector.el
    (test-duplicates-detector--find-duplicates):
    * testing/lisp/test-ob-haskell-ghci.el
    (test-ob-haskell-ghci-checking-buffers):
    * testing/lisp/test-ob-python.el
    (test-ob-python/async-local-python-shell):
    * testing/lisp/test-ob-shell.el (test-ob-shell/bash-uses-assoc-arrays)
    (test-ob-shell/bash-uses-assoc-arrays-with-lists)
    (test-ob-shell/remote-with-stdin-or-cmdline):
    Replace use of if-let and when-let, obsolete in Emacs 31.0.50.
    
    (cherry picked from commit bc7033f2d1bc2494c0489f6efc53b653fd559320)
---
 lisp/ob-R.el                             |  2 +-
 lisp/ob-clojure.el                       |  4 ++--
 lisp/ob-core.el                          |  2 +-
 lisp/ob-exp.el                           |  2 +-
 lisp/ob-julia.el                         |  2 +-
 lisp/ob-python.el                        |  2 +-
 lisp/ol.el                               |  2 +-
 lisp/org-attach.el                       |  2 +-
 lisp/org-clock.el                        |  2 +-
 lisp/org-compat.el                       |  8 ++++----
 lisp/org-element-ast.el                  |  8 ++++----
 lisp/org-element.el                      | 10 +++++-----
 lisp/org-goto.el                         |  2 +-
 lisp/org-lint.el                         |  8 ++++----
 lisp/org-macs.el                         |  2 +-
 lisp/org-persist.el                      |  8 ++++----
 lisp/org-table.el                        |  2 +-
 lisp/org.el                              |  4 ++--
 lisp/ox-html.el                          |  6 +++---
 lisp/ox-latex.el                         |  2 +-
 lisp/ox.el                               |  4 ++--
 testing/lisp/test-duplicates-detector.el | 22 +++++++++++-----------
 testing/lisp/test-ob-haskell-ghci.el     |  2 +-
 testing/lisp/test-ob-python.el           |  2 +-
 testing/lisp/test-ob-shell.el            |  6 +++---
 25 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index de2d27a9a7..8074496f88 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -288,7 +288,7 @@ Use PARAMS to set default directory when creating a new 
session."
   "Associate R code buffer with an R session.
 Make SESSION be the inferior ESS process associated with the
 current code buffer."
-  (when-let ((process (get-buffer-process session)))
+  (when-let* ((process (get-buffer-process session)))
     (setq ess-local-process-name (process-name process))
     (ess-make-buffer-current))
   (setq-local ess-gen-proc-buffer-name-function (lambda (_) session)))
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index c7ebbbb95e..eb2d8c34ca 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -120,14 +120,14 @@
   :package-version '(Org . "9.6"))
 
 (defcustom ob-clojure-nbb-command (or (executable-find "nbb")
-                                      (when-let (npx (executable-find "npx"))
+                                      (when-let* ((npx (executable-find 
"npx")))
                                         (concat npx " nbb")))
   "Nbb command used by the ClojureScript `nbb' backend."
   :type '(choice string (const nil))
   :group 'org-babel
   :package-version '(Org . "9.7"))
 
-(defcustom ob-clojure-cli-command (when-let (cmd (executable-find "clojure"))
+(defcustom ob-clojure-cli-command (when-let* ((cmd (executable-find 
"clojure")))
                                     (concat cmd " -M"))
   "Clojure CLI command used by the Clojure `clojure-cli' backend."
   :type '(choice string (const nil))
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index b0db285fbd..c46efc9ec0 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -887,7 +887,7 @@ guess will be made."
                 (default-directory
                  (cond
                   ((not dir) default-directory)
-                   ((when-let ((session (org-babel-session-buffer info)))
+                   ((when-let* ((session (org-babel-session-buffer info)))
                       (buffer-local-value 'default-directory (get-buffer 
session))))
                   ((member mkdirp '("no" "nil" nil))
                    (file-name-as-directory (expand-file-name dir)))
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 30b2a42a6c..b9d5f288ac 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -441,7 +441,7 @@ replaced with its value."
      ("header-args"
       .
       ,(org-babel-exp--at-source
-           (when-let ((params (org-element-property :parameters 
(org-element-context))))
+           (when-let* ((params (org-element-property :parameters 
(org-element-context))))
              (concat " " params))))
      ,@(mapcar (lambda (pair)
                 (cons (substring (symbol-name (car pair)) 1)
diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
index 10a331e54d..224a8ec75e 100644
--- a/lisp/ob-julia.el
+++ b/lisp/ob-julia.el
@@ -75,7 +75,7 @@
   "Associate R code buffer with an R session.
 Make SESSION be the inferior ESS process associated with the
 current code buffer."
-  (when-let ((process (get-buffer-process session)))
+  (when-let* ((process (get-buffer-process session)))
     (setq ess-local-process-name (process-name process))
     (ess-make-buffer-current))
   (setq-local ess-gen-proc-buffer-name-function (lambda (_) session)))
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 8a3c24f703..f881918c75 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -269,7 +269,7 @@ results as a string."
   "Return non-nil if the last prompt matches input prompt.
 Backport of `python-util-comint-end-of-output-p' to emacs28.  To
 be removed after minimum supported version reaches emacs29."
-  (when-let ((prompt (python-util-comint-last-prompt)))
+  (when-let* ((prompt (python-util-comint-last-prompt)))
     (python-shell-comint-end-of-output-p
      (buffer-substring-no-properties
       (car prompt) (cdr prompt)))))
diff --git a/lisp/ol.el b/lisp/ol.el
index a16f27c2e3..c3101254f7 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -2028,7 +2028,7 @@ non-interactively, don't allow editing the default 
description."
                           (setq link (substring link 0 -1))))
              (setq link (with-current-buffer origbuf
                           (org-link--try-special-completion link)))))
-        (when-let ((window (get-buffer-window "*Org Links*" t)))
+        (when-let* ((window (get-buffer-window "*Org Links*" t)))
           (quit-window 'kill window))
        (set-window-configuration wcf)
        (when (get-buffer "*Org Links*")
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index fc7f50a08e..a441971238 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -357,7 +357,7 @@ Shows a list of commands and prompts for another key to 
execute a command."
                  (while (and (setq c (read-char-exclusive))
                               (memq c '(?\C-n ?\C-p ?\C-v ?\M-v)))
                    (org-scroll c t)))
-              (when-let ((window (get-buffer-window "*Org Attach*" t)))
+              (when-let* ((window (get-buffer-window "*Org Attach*" t)))
                 (quit-window 'kill window))
              (and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*")))))
         (let ((command (cl-some (lambda (entry)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 316cd7eee4..7ac4f27ad8 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -698,7 +698,7 @@ there is no recent clock to choose from."
        (fit-window-to-buffer nil nil (if (< chl 10) chl (+ 5 chl)))
        (message (or prompt "Select task for clocking:"))
        (unwind-protect (setq cursor-type nil rpl (read-char-exclusive))
-          (when-let ((window (get-buffer-window "*Clock Task Select*" t)))
+          (when-let* ((window (get-buffer-window "*Clock Task Select*" t)))
             (quit-window 'kill window))
          (when (get-buffer "*Clock Task Select*")
             (kill-buffer "*Clock Task Select*")))
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 41c26ad72f..e92b8d718c 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -115,10 +115,10 @@ This is an action function for buffer display, see Info
 node `(elisp) Buffer Display Action Functions'.  It should be
 called only by `display-buffer' or a function directly or
 indirectly called by the latter."
-    (when-let ((window (or (display-buffer-reuse-window buffer alist)
-                           (display-buffer-same-window buffer alist)
-                           (display-buffer-pop-up-window buffer alist)
-                           (display-buffer-use-some-window buffer alist))))
+    (when-let* ((window (or (display-buffer-reuse-window buffer alist)
+                            (display-buffer-same-window buffer alist)
+                            (display-buffer-pop-up-window buffer alist)
+                            (display-buffer-use-some-window buffer alist))))
       (delete-other-windows window)
       window)))
 
diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index f3f7492800..e96b129f1f 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -410,7 +410,7 @@ If PROPERTY is not present, return DFLT."
     (let ((idx (org-element--property-idx (inline-const-val property))))
       (inline-quote
        (let ((idx (or ,idx (org-element--property-idx ,property))))
-         (if-let ((parray (and idx (org-element--parray ,node))))
+         (if-let* ((parray (and idx (org-element--parray ,node))))
              (pcase (aref parray idx)
                (`org-element-ast--nil ,dflt)
                (val val))
@@ -456,7 +456,7 @@ Return modified NODE."
         (inline-quote
          (let ((idx (org-element--property-idx ,property)))
            (if (and idx (not (org-element-type-p ,node 'plain-text)))
-               (when-let
+               (when-let*
                    ((parray
                      (or (org-element--parray ,node)
                          (org-element--put-parray ,node))))
@@ -796,7 +796,7 @@ When DATUM is `plain-text', all the properties are removed."
     (type
      (let ((node-copy (append (list type (copy-sequence (cadr datum))) 
(copy-sequence (cddr datum)))))
        ;; Copy `:standard-properties'
-       (when-let ((parray (org-element-property-raw :standard-properties 
node-copy)))
+       (when-let* ((parray (org-element-property-raw :standard-properties 
node-copy)))
          (org-element-put-property node-copy :standard-properties 
(copy-sequence parray)))
        ;; Clear `:parent'.
        (org-element-put-property node-copy :parent nil)
@@ -810,7 +810,7 @@ When DATUM is `plain-text', all the properties are removed."
        ;; properties.  So, we need to reassign inner `:parent'
        ;; properties to the DATUM copy explicitly.
        (dolist (secondary-prop (org-element-property :secondary node-copy))
-         (when-let ((secondary-value (org-element-property secondary-prop 
node-copy)))
+         (when-let* ((secondary-value (org-element-property secondary-prop 
node-copy)))
            (setq secondary-value (org-element-copy secondary-value t))
            (if (org-element-type secondary-value)
                (org-element-put-property secondary-value :parent node-copy)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index cecc0e1405..f119ed739d 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4455,10 +4455,10 @@ Assume point is at the beginning of the timestamp."
                   (and val (number-to-string val)))
                 (pcase (org-element-property :repeater-unit timestamp)
                   (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y"))
-                 (when-let ((repeater-deadline-value
-                             (org-element-property :repeater-deadline-value 
timestamp))
-                            (repeater-deadline-unit
-                             (org-element-property :repeater-deadline-unit 
timestamp)))
+                 (when-let* ((repeater-deadline-value
+                              (org-element-property :repeater-deadline-value 
timestamp))
+                             (repeater-deadline-unit
+                              (org-element-property :repeater-deadline-unit 
timestamp)))
                    (concat
                     "/"
                     (number-to-string repeater-deadline-value)
@@ -6013,7 +6013,7 @@ cache during the synchronization get a new key generated 
with
 Such keys are stored inside the element property
 `:org-element--cache-sync-key'.  The property is a cons containing
 current `org-element--cache-sync-keys-value' and the element key."
-  (or (when-let ((key-cons (org-element-property :org-element--cache-sync-key 
element)))
+  (or (when-let* ((key-cons (org-element-property :org-element--cache-sync-key 
element)))
         (when (eq org-element--cache-sync-keys-value (car key-cons))
           (cdr key-cons)))
       (let* ((begin (org-element-begin element))
diff --git a/lisp/org-goto.el b/lisp/org-goto.el
index cb74942a5e..f75cc9ed85 100644
--- a/lisp/org-goto.el
+++ b/lisp/org-goto.el
@@ -241,7 +241,7 @@ position or nil."
        (message "Select location and press RET")
        (use-local-map org-goto-map)
        (unwind-protect (recursive-edit)
-          (when-let ((window (get-buffer-window "*Org Help*" t)))
+          (when-let* ((window (get-buffer-window "*Org Help*" t)))
             (quit-window 'kill window)))))
     (when (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
     (cons org-goto-selected-point org-goto-exit-command)))
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index 2d87ae270c..0f96134587 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -551,7 +551,7 @@ Use :header-args: instead"
 (defun org-lint-suspicious-language-in-src-block (ast)
   (org-element-map ast 'src-block
     (lambda (b)
-      (when-let ((lang (org-element-property :language b)))
+      (when-let* ((lang (org-element-property :language b)))
         (unless (or (functionp (intern (format "org-babel-execute:%s" lang)))
                     ;; No babel backend, but there is corresponding
                     ;; major mode.
@@ -859,9 +859,9 @@ Use \"export %s\" instead"
                                 (when (member prop common-options)
                                   "global ")
                                 prop
-                                (if-let ((backends
-                                          (and (not (member prop 
common-options))
-                                               (cdr (assoc-string prop 
options-alist)))))
+                                (if-let* ((backends
+                                           (and (not (member prop 
common-options))
+                                                (cdr (assoc-string prop 
options-alist)))))
                                     (format
                                      " in %S export %s"
                                      (if (= 1 (length backends)) (car 
backends) backends)
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index a6ff0e5451..4071b632fc 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -573,7 +573,7 @@ is selected, only the bare key is returned."
                   ((assoc current specials) (throw 'exit current))
                   (t (error "No entry available")))))))
         (when buffer
-          (when-let ((window (get-buffer-window buffer t)))
+          (when-let* ((window (get-buffer-window buffer t)))
             (quit-window 'kill window))
           (kill-buffer buffer))))))
 
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index eec905e742..886d227c0a 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -810,8 +810,8 @@ COLLECTION is the plist holding data collection."
   (let ((scope (nth 2 container)))
     (pcase scope
       ((pred stringp)
-       (when-let ((buf (or (get-buffer scope)
-                           (get-file-buffer scope))))
+       (when-let* ((buf (or (get-buffer scope)
+                            (get-file-buffer scope))))
          ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28.
          ;; Not using it yet to keep backward compatibility.
          (condition-case nil
@@ -821,8 +821,8 @@ COLLECTION is the plist holding data collection."
        (when (boundp (cadr container))
          (symbol-value (cadr container))))
       (`nil
-       (if-let ((buf (and (plist-get (plist-get collection :associated) :file)
-                          (get-file-buffer (plist-get (plist-get collection 
:associated) :file)))))
+       (if-let* ((buf (and (plist-get (plist-get collection :associated) :file)
+                           (get-file-buffer (plist-get (plist-get collection 
:associated) :file)))))
            ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28.
            ;; Not using it yet to keep backward compatibility.
            (condition-case nil
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 8a0943a48b..222bc7d965 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3709,7 +3709,7 @@ With prefix ARG, apply the new formulas to the table."
     (org-table-store-formulas eql)
     (set-marker pos nil)
     (set-marker source nil)
-    (when-let ((window (get-buffer-window "*Edit Formulas*" t)))
+    (when-let* ((window (get-buffer-window "*Edit Formulas*" t)))
       (quit-window 'kill window))
     (when (get-buffer "*Edit Formulas*") (kill-buffer "*Edit Formulas*"))
     (if arg
diff --git a/lisp/org.el b/lisp/org.el
index ae39315a31..2d70fa6239 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13233,8 +13233,8 @@ However, if LITERAL-NIL is set, return the string value 
\"nil\" instead."
     ;; Consider global properties, if we found no PROPERTY (or maybe
     ;; only PROPERTY+).
     (unless found-inherited?
-      (when-let ((global (org--property-global-or-keyword-value
-                          property t)))
+      (when-let* ((global (org--property-global-or-keyword-value
+                           property t)))
         (setq values (cons global values))))
     (when values
       (setq values (mapconcat
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 446698758c..4eb3a511b0 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1732,7 +1732,7 @@ targets and targets."
           (and (memq type '(radio-target target))
                (org-element-property :value datum))
           (org-element-property :name datum)
-          (when-let ((id (org-element-property :ID datum)))
+          (when-let* ((id (org-element-property :ID datum)))
             (concat org-html--id-attr-prefix id)))))
 
     (cond
@@ -2052,7 +2052,7 @@ INFO is a plist used as a communication channel."
           (when value
             (pcase symbol
               (`font
-               (when-let
+               (when-let*
                    ((value-new
                      (pcase value
                        ("TeX" "mathjax-tex")
@@ -2697,7 +2697,7 @@ information."
   (let ((attributes (org-export-read-attribute :attr_html example-block)))
     (if (plist-get attributes :textarea)
        (org-html--textarea-block example-block)
-      (if-let ((class-val (plist-get attributes :class)))
+      (if-let* ((class-val (plist-get attributes :class)))
           (setq attributes (plist-put attributes :class (concat "example " 
class-val)))
         (setq attributes (plist-put attributes :class "example")))
       (format "<pre%s>\n%s</pre>"
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 79df1fe119..4d0935b073 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -4097,7 +4097,7 @@ a communication channel."
           (unless (hash-table-p table-head-cache)
             (setq table-head-cache (make-hash-table :test #'eq))
             (plist-put info :org-latex-table-head-cache table-head-cache))
-          (if-let ((head-contents (gethash (org-element-parent table-row) 
table-head-cache)))
+          (if-let* ((head-contents (gethash (org-element-parent table-row) 
table-head-cache)))
               (puthash (org-element-parent table-row) (concat head-contents 
"\\\\\n" contents)
                        table-head-cache)
             (puthash (org-element-parent table-row) contents 
table-head-cache))))
diff --git a/lisp/ox.el b/lisp/ox.el
index 6ad09b72d9..368e10c8bb 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2672,7 +2672,7 @@ from tree."
                (let ((type (org-element-type data)))
                  (if (org-export--skip-p data info selected excluded)
                      (if (memq type '(table-cell table-row)) (push data ignore)
-                        (if-let ((keep-spaces (org-export--keep-spaces data 
info)))
+                        (if-let* ((keep-spaces (org-export--keep-spaces data 
info)))
                            ;; Keep spaces in place of removed
                            ;; element, if necessary.
                            ;; Example: "Foo.[10%] Bar" would become
@@ -3456,7 +3456,7 @@ file."
        (with-temp-buffer
          (let ((org-inhibit-startup t)
                (lines
-                (if-let ((location (plist-get parameters :location)))
+                (if-let* ((location (plist-get parameters :location)))
                     (org-export--inclusion-absolute-lines
                      file location
                      (plist-get parameters :only-contents)
diff --git a/testing/lisp/test-duplicates-detector.el 
b/testing/lisp/test-duplicates-detector.el
index 2e9222e102..9850a2a0d0 100644
--- a/testing/lisp/test-duplicates-detector.el
+++ b/testing/lisp/test-duplicates-detector.el
@@ -150,17 +150,17 @@ Duplicate forms will be written to
                 (while (setq deftest (read (current-buffer)))
                   (setq test-name (cadr deftest))
                   (when (eq (car deftest) 'ert-deftest)
-                   (if-let ((f (seq-find
-                                (lambda (x)
-                                  (equal-including-properties
-                                   ;; if cadddr is a docstring
-                                   (if (stringp (cadddr deftest))
-                                       (cddddr deftest)
-                                     (cdddr deftest))
-                                   (if (stringp (cadddr x))
-                                       (cddddr x)
-                                     (cdddr x))))
-                                found-deftests)))
+                   (if-let* ((f (seq-find
+                                 (lambda (x)
+                                   (equal-including-properties
+                                    ;; if cadddr is a docstring
+                                    (if (stringp (cadddr deftest))
+                                        (cddddr deftest)
+                                      (cdddr deftest))
+                                    (if (stringp (cadddr x))
+                                        (cddddr x)
+                                      (cdddr x))))
+                                 found-deftests)))
                         (push (cons test-name (cadr f)) duplicate-tests)
                      (push deftest found-deftests)
                       (test-duplicates-detector--search-forms-recursively
diff --git a/testing/lisp/test-ob-haskell-ghci.el 
b/testing/lisp/test-ob-haskell-ghci.el
index 990addcd44..66c73ec00c 100644
--- a/testing/lisp/test-ob-haskell-ghci.el
+++ b/testing/lisp/test-ob-haskell-ghci.el
@@ -45,7 +45,7 @@
   (when (get-buffer "*haskell*")
     (error "A buffer named '*haskell*' exists.  Can't safely test haskell 
blocks"))
   (prog1 (funcall todo)
-    (when-let ((hb (get-buffer "*haskell*")))
+    (when-let* ((hb (get-buffer "*haskell*")))
       ;; We created a "*haskell*" buffer. That shouldn't happen.
       (error "'ob-haskell' created a buffer named '*haskell*'"))))
 
diff --git a/testing/lisp/test-ob-python.el b/testing/lisp/test-ob-python.el
index e3c6a40096..b1618df94e 100644
--- a/testing/lisp/test-ob-python.el
+++ b/testing/lisp/test-ob-python.el
@@ -300,7 +300,7 @@ print(list(range(3)))
   ;; Disable the test on older Emacs as built-in python.el sometimes
   ;; fail to initialize session.
   (skip-unless (version<= "28" emacs-version))
-  (when-let ((buf (get-buffer "*Python*")))
+  (when-let* ((buf (get-buffer "*Python*")))
     (let (kill-buffer-query-functions)
       (kill-buffer buf)))
   (org-test-with-temp-text-in-file
diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el
index b760031b4e..34ae2ebb32 100644
--- a/testing/lisp/test-ob-shell.el
+++ b/testing/lisp/test-ob-shell.el
@@ -232,7 +232,7 @@ Bash will see a table that contains the first column as the
 value. "
   (skip-unless
    ;; Old GPLv2 BASH in macOSX does not support associative arrays.
-   (if-let ((bash (executable-find "bash")))
+   (if-let* ((bash (executable-find "bash")))
        (eq 0 (process-file bash nil nil nil "-c" "declare -A assoc_array"))))
   (org-test-with-temp-text
       "#+NAME: sample_mapping_table
@@ -255,7 +255,7 @@ Bash will see an associative array that contains each row 
as a single
 string. Bash cannot handle lists in associative arrays."
   (skip-unless
    ;; Old GPLv2 BASH in macOSX does not support associative arrays.
-   (if-let ((bash (executable-find "bash")))
+   (if-let* ((bash (executable-find "bash")))
        (eq 0 (process-file bash nil nil nil "-c" "declare -A assoc_array"))))
   (org-test-with-temp-text
       "#+NAME: sample_big_table
@@ -313,7 +313,7 @@ echo ${table[spaghetti]}
               (params-line "")
               (who-line "  export who=tramp")
               (args-line "  echo ARGS: --verbose 23 71"))
-          (when-let ((dir (plist-get spec :dir)))
+          (when-let* ((dir (plist-get spec :dir)))
             (setq params-line (concat params-line " " ":dir " dir)))
           (when (plist-get spec :stdin)
             (setq who-line "  read -r who")



reply via email to

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