diff options
| author | Sean Whitton | 2024-10-24 17:04:40 +0800 |
|---|---|---|
| committer | Sean Whitton | 2024-10-27 11:06:40 +0800 |
| commit | d354300993e6a48e2d3e72a7e89348cc06b326fb (patch) | |
| tree | a75acd57aafeffd040c97ccbdc34424cca2c83e8 | |
| parent | 2030b8c7f24a10024ab973149b10194fd50dd2bb (diff) | |
| download | emacs-d354300993e6a48e2d3e72a7e89348cc06b326fb.tar.gz emacs-d354300993e6a48e2d3e72a7e89348cc06b326fb.zip | |
lisp/org: Backport org-mode.git fix for if-let/when-let obsolescence
Backporting this acked by Org maintainer Ihor Radchenko.
* lisp/org/ob-R.el (org-babel-R-associate-session):
* lisp/org/ob-clojure.el (ob-clojure-nbb-command)
(ob-clojure-cli-command):
* lisp/org/ob-core.el (org-babel-execute-src-block):
* lisp/org/ob-exp.el (org-babel-exp-code):
* lisp/org/ob-julia.el (org-babel-julia-associate-session):
* lisp/org/ob-python.el
(org-babel-python--python-util-comint-end-of-output-p):
* lisp/org/ol.el (org-insert-link):
* lisp/org/org-attach.el (org-attach):
* lisp/org/org-clock.el (org-clock-select-task):
* lisp/org/org-compat.el (fboundp):
* lisp/org/org-element-ast.el (org-element-property-raw)
(org-element-put-property, org-element-copy):
* lisp/org/org-element.el (org-element-timestamp-interpreter)
(org-element--cache-key):
* lisp/org/org-goto.el (org-goto-location):
* lisp/org/org-lint.el
(org-lint-suspicious-language-in-src-block)
(org-lint-export-option-keywords):
* lisp/org/org-macs.el (org-mks):
* lisp/org/org-persist.el: (org-persist-write:elisp):
* lisp/org/org-table.el (org-table-fedit-finish):
* lisp/org/org.el (org-entry-get-with-inheritance):
* lisp/org/ox-html.el (org-html--reference)
(org-html--build-mathjax-config, org-html-example-block):
* lisp/org/ox-latex.el (org-latex-table-row):
* lisp/org/ox.el (org-export--prune-tree)
(org-export--blindly-expand-include):
Replace use of if-let and when-let, obsolete in Emacs 31.0.50.
| -rw-r--r-- | lisp/org/ob-R.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-clojure.el | 4 | ||||
| -rw-r--r-- | lisp/org/ob-core.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-exp.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-julia.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-python.el | 2 | ||||
| -rw-r--r-- | lisp/org/ol.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-attach.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-clock.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-compat.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-element-ast.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-element.el | 10 | ||||
| -rw-r--r-- | lisp/org/org-goto.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-lint.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-macs.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-persist.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-table.el | 2 | ||||
| -rw-r--r-- | lisp/org/org.el | 4 | ||||
| -rw-r--r-- | lisp/org/ox-html.el | 6 | ||||
| -rw-r--r-- | lisp/org/ox-latex.el | 2 | ||||
| -rw-r--r-- | lisp/org/ox.el | 4 |
21 files changed, 42 insertions, 42 deletions
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index de2d27a9a70..8074496f881 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el | |||
| @@ -288,7 +288,7 @@ Use PARAMS to set default directory when creating a new session." | |||
| 288 | "Associate R code buffer with an R session. | 288 | "Associate R code buffer with an R session. |
| 289 | Make SESSION be the inferior ESS process associated with the | 289 | Make SESSION be the inferior ESS process associated with the |
| 290 | current code buffer." | 290 | current code buffer." |
| 291 | (when-let ((process (get-buffer-process session))) | 291 | (when-let* ((process (get-buffer-process session))) |
| 292 | (setq ess-local-process-name (process-name process)) | 292 | (setq ess-local-process-name (process-name process)) |
| 293 | (ess-make-buffer-current)) | 293 | (ess-make-buffer-current)) |
| 294 | (setq-local ess-gen-proc-buffer-name-function (lambda (_) session))) | 294 | (setq-local ess-gen-proc-buffer-name-function (lambda (_) session))) |
diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index c7ebbbb95e9..eb2d8c34cac 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el | |||
| @@ -120,14 +120,14 @@ | |||
| 120 | :package-version '(Org . "9.6")) | 120 | :package-version '(Org . "9.6")) |
| 121 | 121 | ||
| 122 | (defcustom ob-clojure-nbb-command (or (executable-find "nbb") | 122 | (defcustom ob-clojure-nbb-command (or (executable-find "nbb") |
| 123 | (when-let (npx (executable-find "npx")) | 123 | (when-let* ((npx (executable-find "npx"))) |
| 124 | (concat npx " nbb"))) | 124 | (concat npx " nbb"))) |
| 125 | "Nbb command used by the ClojureScript `nbb' backend." | 125 | "Nbb command used by the ClojureScript `nbb' backend." |
| 126 | :type '(choice string (const nil)) | 126 | :type '(choice string (const nil)) |
| 127 | :group 'org-babel | 127 | :group 'org-babel |
| 128 | :package-version '(Org . "9.7")) | 128 | :package-version '(Org . "9.7")) |
| 129 | 129 | ||
| 130 | (defcustom ob-clojure-cli-command (when-let (cmd (executable-find "clojure")) | 130 | (defcustom ob-clojure-cli-command (when-let* ((cmd (executable-find "clojure"))) |
| 131 | (concat cmd " -M")) | 131 | (concat cmd " -M")) |
| 132 | "Clojure CLI command used by the Clojure `clojure-cli' backend." | 132 | "Clojure CLI command used by the Clojure `clojure-cli' backend." |
| 133 | :type '(choice string (const nil)) | 133 | :type '(choice string (const nil)) |
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 7b4ca9b5ea3..b657a93dab3 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el | |||
| @@ -870,7 +870,7 @@ guess will be made." | |||
| 870 | (default-directory | 870 | (default-directory |
| 871 | (cond | 871 | (cond |
| 872 | ((not dir) default-directory) | 872 | ((not dir) default-directory) |
| 873 | ((when-let ((session (org-babel-session-buffer info))) | 873 | ((when-let* ((session (org-babel-session-buffer info))) |
| 874 | (buffer-local-value 'default-directory (get-buffer session)))) | 874 | (buffer-local-value 'default-directory (get-buffer session)))) |
| 875 | ((member mkdirp '("no" "nil" nil)) | 875 | ((member mkdirp '("no" "nil" nil)) |
| 876 | (file-name-as-directory (expand-file-name dir))) | 876 | (file-name-as-directory (expand-file-name dir))) |
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 30b2a42a6c4..b9d5f288ac1 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el | |||
| @@ -441,7 +441,7 @@ replaced with its value." | |||
| 441 | ("header-args" | 441 | ("header-args" |
| 442 | . | 442 | . |
| 443 | ,(org-babel-exp--at-source | 443 | ,(org-babel-exp--at-source |
| 444 | (when-let ((params (org-element-property :parameters (org-element-context)))) | 444 | (when-let* ((params (org-element-property :parameters (org-element-context)))) |
| 445 | (concat " " params)))) | 445 | (concat " " params)))) |
| 446 | ,@(mapcar (lambda (pair) | 446 | ,@(mapcar (lambda (pair) |
| 447 | (cons (substring (symbol-name (car pair)) 1) | 447 | (cons (substring (symbol-name (car pair)) 1) |
diff --git a/lisp/org/ob-julia.el b/lisp/org/ob-julia.el index 10a331e54d5..224a8ec75e8 100644 --- a/lisp/org/ob-julia.el +++ b/lisp/org/ob-julia.el | |||
| @@ -75,7 +75,7 @@ | |||
| 75 | "Associate R code buffer with an R session. | 75 | "Associate R code buffer with an R session. |
| 76 | Make SESSION be the inferior ESS process associated with the | 76 | Make SESSION be the inferior ESS process associated with the |
| 77 | current code buffer." | 77 | current code buffer." |
| 78 | (when-let ((process (get-buffer-process session))) | 78 | (when-let* ((process (get-buffer-process session))) |
| 79 | (setq ess-local-process-name (process-name process)) | 79 | (setq ess-local-process-name (process-name process)) |
| 80 | (ess-make-buffer-current)) | 80 | (ess-make-buffer-current)) |
| 81 | (setq-local ess-gen-proc-buffer-name-function (lambda (_) session))) | 81 | (setq-local ess-gen-proc-buffer-name-function (lambda (_) session))) |
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 8a3c24f7038..f881918c75c 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el | |||
| @@ -269,7 +269,7 @@ results as a string." | |||
| 269 | "Return non-nil if the last prompt matches input prompt. | 269 | "Return non-nil if the last prompt matches input prompt. |
| 270 | Backport of `python-util-comint-end-of-output-p' to emacs28. To | 270 | Backport of `python-util-comint-end-of-output-p' to emacs28. To |
| 271 | be removed after minimum supported version reaches emacs29." | 271 | be removed after minimum supported version reaches emacs29." |
| 272 | (when-let ((prompt (python-util-comint-last-prompt))) | 272 | (when-let* ((prompt (python-util-comint-last-prompt))) |
| 273 | (python-shell-comint-end-of-output-p | 273 | (python-shell-comint-end-of-output-p |
| 274 | (buffer-substring-no-properties | 274 | (buffer-substring-no-properties |
| 275 | (car prompt) (cdr prompt))))) | 275 | (car prompt) (cdr prompt))))) |
diff --git a/lisp/org/ol.el b/lisp/org/ol.el index a16f27c2e30..c3101254f70 100644 --- a/lisp/org/ol.el +++ b/lisp/org/ol.el | |||
| @@ -2028,7 +2028,7 @@ non-interactively, don't allow editing the default description." | |||
| 2028 | (setq link (substring link 0 -1)))) | 2028 | (setq link (substring link 0 -1)))) |
| 2029 | (setq link (with-current-buffer origbuf | 2029 | (setq link (with-current-buffer origbuf |
| 2030 | (org-link--try-special-completion link))))) | 2030 | (org-link--try-special-completion link))))) |
| 2031 | (when-let ((window (get-buffer-window "*Org Links*" t))) | 2031 | (when-let* ((window (get-buffer-window "*Org Links*" t))) |
| 2032 | (quit-window 'kill window)) | 2032 | (quit-window 'kill window)) |
| 2033 | (set-window-configuration wcf) | 2033 | (set-window-configuration wcf) |
| 2034 | (when (get-buffer "*Org Links*") | 2034 | (when (get-buffer "*Org Links*") |
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index fc7f50a08e7..a441971238a 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el | |||
| @@ -357,7 +357,7 @@ Shows a list of commands and prompts for another key to execute a command." | |||
| 357 | (while (and (setq c (read-char-exclusive)) | 357 | (while (and (setq c (read-char-exclusive)) |
| 358 | (memq c '(?\C-n ?\C-p ?\C-v ?\M-v))) | 358 | (memq c '(?\C-n ?\C-p ?\C-v ?\M-v))) |
| 359 | (org-scroll c t))) | 359 | (org-scroll c t))) |
| 360 | (when-let ((window (get-buffer-window "*Org Attach*" t))) | 360 | (when-let* ((window (get-buffer-window "*Org Attach*" t))) |
| 361 | (quit-window 'kill window)) | 361 | (quit-window 'kill window)) |
| 362 | (and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*"))))) | 362 | (and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*"))))) |
| 363 | (let ((command (cl-some (lambda (entry) | 363 | (let ((command (cl-some (lambda (entry) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 316cd7eee4b..7ac4f27ad80 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -698,7 +698,7 @@ there is no recent clock to choose from." | |||
| 698 | (fit-window-to-buffer nil nil (if (< chl 10) chl (+ 5 chl))) | 698 | (fit-window-to-buffer nil nil (if (< chl 10) chl (+ 5 chl))) |
| 699 | (message (or prompt "Select task for clocking:")) | 699 | (message (or prompt "Select task for clocking:")) |
| 700 | (unwind-protect (setq cursor-type nil rpl (read-char-exclusive)) | 700 | (unwind-protect (setq cursor-type nil rpl (read-char-exclusive)) |
| 701 | (when-let ((window (get-buffer-window "*Clock Task Select*" t))) | 701 | (when-let* ((window (get-buffer-window "*Clock Task Select*" t))) |
| 702 | (quit-window 'kill window)) | 702 | (quit-window 'kill window)) |
| 703 | (when (get-buffer "*Clock Task Select*") | 703 | (when (get-buffer "*Clock Task Select*") |
| 704 | (kill-buffer "*Clock Task Select*"))) | 704 | (kill-buffer "*Clock Task Select*"))) |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 41c26ad72fe..e92b8d718c8 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -115,10 +115,10 @@ This is an action function for buffer display, see Info | |||
| 115 | node `(elisp) Buffer Display Action Functions'. It should be | 115 | node `(elisp) Buffer Display Action Functions'. It should be |
| 116 | called only by `display-buffer' or a function directly or | 116 | called only by `display-buffer' or a function directly or |
| 117 | indirectly called by the latter." | 117 | indirectly called by the latter." |
| 118 | (when-let ((window (or (display-buffer-reuse-window buffer alist) | 118 | (when-let* ((window (or (display-buffer-reuse-window buffer alist) |
| 119 | (display-buffer-same-window buffer alist) | 119 | (display-buffer-same-window buffer alist) |
| 120 | (display-buffer-pop-up-window buffer alist) | 120 | (display-buffer-pop-up-window buffer alist) |
| 121 | (display-buffer-use-some-window buffer alist)))) | 121 | (display-buffer-use-some-window buffer alist)))) |
| 122 | (delete-other-windows window) | 122 | (delete-other-windows window) |
| 123 | window))) | 123 | window))) |
| 124 | 124 | ||
diff --git a/lisp/org/org-element-ast.el b/lisp/org/org-element-ast.el index f3f74928004..e96b129f1fc 100644 --- a/lisp/org/org-element-ast.el +++ b/lisp/org/org-element-ast.el | |||
| @@ -410,7 +410,7 @@ If PROPERTY is not present, return DFLT." | |||
| 410 | (let ((idx (org-element--property-idx (inline-const-val property)))) | 410 | (let ((idx (org-element--property-idx (inline-const-val property)))) |
| 411 | (inline-quote | 411 | (inline-quote |
| 412 | (let ((idx (or ,idx (org-element--property-idx ,property)))) | 412 | (let ((idx (or ,idx (org-element--property-idx ,property)))) |
| 413 | (if-let ((parray (and idx (org-element--parray ,node)))) | 413 | (if-let* ((parray (and idx (org-element--parray ,node)))) |
| 414 | (pcase (aref parray idx) | 414 | (pcase (aref parray idx) |
| 415 | (`org-element-ast--nil ,dflt) | 415 | (`org-element-ast--nil ,dflt) |
| 416 | (val val)) | 416 | (val val)) |
| @@ -456,7 +456,7 @@ Return modified NODE." | |||
| 456 | (inline-quote | 456 | (inline-quote |
| 457 | (let ((idx (org-element--property-idx ,property))) | 457 | (let ((idx (org-element--property-idx ,property))) |
| 458 | (if (and idx (not (org-element-type-p ,node 'plain-text))) | 458 | (if (and idx (not (org-element-type-p ,node 'plain-text))) |
| 459 | (when-let | 459 | (when-let* |
| 460 | ((parray | 460 | ((parray |
| 461 | (or (org-element--parray ,node) | 461 | (or (org-element--parray ,node) |
| 462 | (org-element--put-parray ,node)))) | 462 | (org-element--put-parray ,node)))) |
| @@ -796,7 +796,7 @@ When DATUM is `plain-text', all the properties are removed." | |||
| 796 | (type | 796 | (type |
| 797 | (let ((node-copy (append (list type (copy-sequence (cadr datum))) (copy-sequence (cddr datum))))) | 797 | (let ((node-copy (append (list type (copy-sequence (cadr datum))) (copy-sequence (cddr datum))))) |
| 798 | ;; Copy `:standard-properties' | 798 | ;; Copy `:standard-properties' |
| 799 | (when-let ((parray (org-element-property-raw :standard-properties node-copy))) | 799 | (when-let* ((parray (org-element-property-raw :standard-properties node-copy))) |
| 800 | (org-element-put-property node-copy :standard-properties (copy-sequence parray))) | 800 | (org-element-put-property node-copy :standard-properties (copy-sequence parray))) |
| 801 | ;; Clear `:parent'. | 801 | ;; Clear `:parent'. |
| 802 | (org-element-put-property node-copy :parent nil) | 802 | (org-element-put-property node-copy :parent nil) |
| @@ -810,7 +810,7 @@ When DATUM is `plain-text', all the properties are removed." | |||
| 810 | ;; properties. So, we need to reassign inner `:parent' | 810 | ;; properties. So, we need to reassign inner `:parent' |
| 811 | ;; properties to the DATUM copy explicitly. | 811 | ;; properties to the DATUM copy explicitly. |
| 812 | (dolist (secondary-prop (org-element-property :secondary node-copy)) | 812 | (dolist (secondary-prop (org-element-property :secondary node-copy)) |
| 813 | (when-let ((secondary-value (org-element-property secondary-prop node-copy))) | 813 | (when-let* ((secondary-value (org-element-property secondary-prop node-copy))) |
| 814 | (setq secondary-value (org-element-copy secondary-value t)) | 814 | (setq secondary-value (org-element-copy secondary-value t)) |
| 815 | (if (org-element-type secondary-value) | 815 | (if (org-element-type secondary-value) |
| 816 | (org-element-put-property secondary-value :parent node-copy) | 816 | (org-element-put-property secondary-value :parent node-copy) |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index a3fe427403a..d184165f6cb 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -4455,10 +4455,10 @@ Assume point is at the beginning of the timestamp." | |||
| 4455 | (and val (number-to-string val))) | 4455 | (and val (number-to-string val))) |
| 4456 | (pcase (org-element-property :repeater-unit timestamp) | 4456 | (pcase (org-element-property :repeater-unit timestamp) |
| 4457 | (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y")) | 4457 | (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y")) |
| 4458 | (when-let ((repeater-deadline-value | 4458 | (when-let* ((repeater-deadline-value |
| 4459 | (org-element-property :repeater-deadline-value timestamp)) | 4459 | (org-element-property :repeater-deadline-value timestamp)) |
| 4460 | (repeater-deadline-unit | 4460 | (repeater-deadline-unit |
| 4461 | (org-element-property :repeater-deadline-unit timestamp))) | 4461 | (org-element-property :repeater-deadline-unit timestamp))) |
| 4462 | (concat | 4462 | (concat |
| 4463 | "/" | 4463 | "/" |
| 4464 | (number-to-string repeater-deadline-value) | 4464 | (number-to-string repeater-deadline-value) |
| @@ -6012,7 +6012,7 @@ cache during the synchronization get a new key generated with | |||
| 6012 | Such keys are stored inside the element property | 6012 | Such keys are stored inside the element property |
| 6013 | `:org-element--cache-sync-key'. The property is a cons containing | 6013 | `:org-element--cache-sync-key'. The property is a cons containing |
| 6014 | current `org-element--cache-sync-keys-value' and the element key." | 6014 | current `org-element--cache-sync-keys-value' and the element key." |
| 6015 | (or (when-let ((key-cons (org-element-property :org-element--cache-sync-key element))) | 6015 | (or (when-let* ((key-cons (org-element-property :org-element--cache-sync-key element))) |
| 6016 | (when (eq org-element--cache-sync-keys-value (car key-cons)) | 6016 | (when (eq org-element--cache-sync-keys-value (car key-cons)) |
| 6017 | (cdr key-cons))) | 6017 | (cdr key-cons))) |
| 6018 | (let* ((begin (org-element-begin element)) | 6018 | (let* ((begin (org-element-begin element)) |
diff --git a/lisp/org/org-goto.el b/lisp/org/org-goto.el index cb74942a5e7..f75cc9ed85a 100644 --- a/lisp/org/org-goto.el +++ b/lisp/org/org-goto.el | |||
| @@ -241,7 +241,7 @@ position or nil." | |||
| 241 | (message "Select location and press RET") | 241 | (message "Select location and press RET") |
| 242 | (use-local-map org-goto-map) | 242 | (use-local-map org-goto-map) |
| 243 | (unwind-protect (recursive-edit) | 243 | (unwind-protect (recursive-edit) |
| 244 | (when-let ((window (get-buffer-window "*Org Help*" t))) | 244 | (when-let* ((window (get-buffer-window "*Org Help*" t))) |
| 245 | (quit-window 'kill window))))) | 245 | (quit-window 'kill window))))) |
| 246 | (when (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) | 246 | (when (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) |
| 247 | (cons org-goto-selected-point org-goto-exit-command))) | 247 | (cons org-goto-selected-point org-goto-exit-command))) |
diff --git a/lisp/org/org-lint.el b/lisp/org/org-lint.el index 2d87ae270c4..0f96134587c 100644 --- a/lisp/org/org-lint.el +++ b/lisp/org/org-lint.el | |||
| @@ -551,7 +551,7 @@ Use :header-args: instead" | |||
| 551 | (defun org-lint-suspicious-language-in-src-block (ast) | 551 | (defun org-lint-suspicious-language-in-src-block (ast) |
| 552 | (org-element-map ast 'src-block | 552 | (org-element-map ast 'src-block |
| 553 | (lambda (b) | 553 | (lambda (b) |
| 554 | (when-let ((lang (org-element-property :language b))) | 554 | (when-let* ((lang (org-element-property :language b))) |
| 555 | (unless (or (functionp (intern (format "org-babel-execute:%s" lang))) | 555 | (unless (or (functionp (intern (format "org-babel-execute:%s" lang))) |
| 556 | ;; No babel backend, but there is corresponding | 556 | ;; No babel backend, but there is corresponding |
| 557 | ;; major mode. | 557 | ;; major mode. |
| @@ -859,9 +859,9 @@ Use \"export %s\" instead" | |||
| 859 | (when (member prop common-options) | 859 | (when (member prop common-options) |
| 860 | "global ") | 860 | "global ") |
| 861 | prop | 861 | prop |
| 862 | (if-let ((backends | 862 | (if-let* ((backends |
| 863 | (and (not (member prop common-options)) | 863 | (and (not (member prop common-options)) |
| 864 | (cdr (assoc-string prop options-alist))))) | 864 | (cdr (assoc-string prop options-alist))))) |
| 865 | (format | 865 | (format |
| 866 | " in %S export %s" | 866 | " in %S export %s" |
| 867 | (if (= 1 (length backends)) (car backends) backends) | 867 | (if (= 1 (length backends)) (car backends) backends) |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index a6ff0e54512..4071b632fcb 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -573,7 +573,7 @@ is selected, only the bare key is returned." | |||
| 573 | ((assoc current specials) (throw 'exit current)) | 573 | ((assoc current specials) (throw 'exit current)) |
| 574 | (t (error "No entry available"))))))) | 574 | (t (error "No entry available"))))))) |
| 575 | (when buffer | 575 | (when buffer |
| 576 | (when-let ((window (get-buffer-window buffer t))) | 576 | (when-let* ((window (get-buffer-window buffer t))) |
| 577 | (quit-window 'kill window)) | 577 | (quit-window 'kill window)) |
| 578 | (kill-buffer buffer)))))) | 578 | (kill-buffer buffer)))))) |
| 579 | 579 | ||
diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el index 7fa836d0d7a..cd66a0a57a8 100644 --- a/lisp/org/org-persist.el +++ b/lisp/org/org-persist.el | |||
| @@ -810,8 +810,8 @@ COLLECTION is the plist holding data collection." | |||
| 810 | (let ((scope (nth 2 container))) | 810 | (let ((scope (nth 2 container))) |
| 811 | (pcase scope | 811 | (pcase scope |
| 812 | ((pred stringp) | 812 | ((pred stringp) |
| 813 | (when-let ((buf (or (get-buffer scope) | 813 | (when-let* ((buf (or (get-buffer scope) |
| 814 | (get-file-buffer scope)))) | 814 | (get-file-buffer scope)))) |
| 815 | ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28. | 815 | ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28. |
| 816 | ;; Not using it yet to keep backward compatibility. | 816 | ;; Not using it yet to keep backward compatibility. |
| 817 | (condition-case nil | 817 | (condition-case nil |
| @@ -821,8 +821,8 @@ COLLECTION is the plist holding data collection." | |||
| 821 | (when (boundp (cadr container)) | 821 | (when (boundp (cadr container)) |
| 822 | (symbol-value (cadr container)))) | 822 | (symbol-value (cadr container)))) |
| 823 | (`nil | 823 | (`nil |
| 824 | (if-let ((buf (and (plist-get (plist-get collection :associated) :file) | 824 | (if-let* ((buf (and (plist-get (plist-get collection :associated) :file) |
| 825 | (get-file-buffer (plist-get (plist-get collection :associated) :file))))) | 825 | (get-file-buffer (plist-get (plist-get collection :associated) :file))))) |
| 826 | ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28. | 826 | ;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28. |
| 827 | ;; Not using it yet to keep backward compatibility. | 827 | ;; Not using it yet to keep backward compatibility. |
| 828 | (condition-case nil | 828 | (condition-case nil |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 8a0943a48b9..222bc7d9658 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -3709,7 +3709,7 @@ With prefix ARG, apply the new formulas to the table." | |||
| 3709 | (org-table-store-formulas eql) | 3709 | (org-table-store-formulas eql) |
| 3710 | (set-marker pos nil) | 3710 | (set-marker pos nil) |
| 3711 | (set-marker source nil) | 3711 | (set-marker source nil) |
| 3712 | (when-let ((window (get-buffer-window "*Edit Formulas*" t))) | 3712 | (when-let* ((window (get-buffer-window "*Edit Formulas*" t))) |
| 3713 | (quit-window 'kill window)) | 3713 | (quit-window 'kill window)) |
| 3714 | (when (get-buffer "*Edit Formulas*") (kill-buffer "*Edit Formulas*")) | 3714 | (when (get-buffer "*Edit Formulas*") (kill-buffer "*Edit Formulas*")) |
| 3715 | (if arg | 3715 | (if arg |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 5bee96fb0b5..4166738c162 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -13219,8 +13219,8 @@ However, if LITERAL-NIL is set, return the string value \"nil\" instead." | |||
| 13219 | ;; Consider global properties, if we found no PROPERTY (or maybe | 13219 | ;; Consider global properties, if we found no PROPERTY (or maybe |
| 13220 | ;; only PROPERTY+). | 13220 | ;; only PROPERTY+). |
| 13221 | (unless found-inherited? | 13221 | (unless found-inherited? |
| 13222 | (when-let ((global (org--property-global-or-keyword-value | 13222 | (when-let* ((global (org--property-global-or-keyword-value |
| 13223 | property t))) | 13223 | property t))) |
| 13224 | (setq values (cons global values)))) | 13224 | (setq values (cons global values)))) |
| 13225 | (when values | 13225 | (when values |
| 13226 | (setq values (mapconcat | 13226 | (setq values (mapconcat |
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 446698758c4..4eb3a511b00 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el | |||
| @@ -1732,7 +1732,7 @@ targets and targets." | |||
| 1732 | (and (memq type '(radio-target target)) | 1732 | (and (memq type '(radio-target target)) |
| 1733 | (org-element-property :value datum)) | 1733 | (org-element-property :value datum)) |
| 1734 | (org-element-property :name datum) | 1734 | (org-element-property :name datum) |
| 1735 | (when-let ((id (org-element-property :ID datum))) | 1735 | (when-let* ((id (org-element-property :ID datum))) |
| 1736 | (concat org-html--id-attr-prefix id))))) | 1736 | (concat org-html--id-attr-prefix id))))) |
| 1737 | 1737 | ||
| 1738 | (cond | 1738 | (cond |
| @@ -2052,7 +2052,7 @@ INFO is a plist used as a communication channel." | |||
| 2052 | (when value | 2052 | (when value |
| 2053 | (pcase symbol | 2053 | (pcase symbol |
| 2054 | (`font | 2054 | (`font |
| 2055 | (when-let | 2055 | (when-let* |
| 2056 | ((value-new | 2056 | ((value-new |
| 2057 | (pcase value | 2057 | (pcase value |
| 2058 | ("TeX" "mathjax-tex") | 2058 | ("TeX" "mathjax-tex") |
| @@ -2697,7 +2697,7 @@ information." | |||
| 2697 | (let ((attributes (org-export-read-attribute :attr_html example-block))) | 2697 | (let ((attributes (org-export-read-attribute :attr_html example-block))) |
| 2698 | (if (plist-get attributes :textarea) | 2698 | (if (plist-get attributes :textarea) |
| 2699 | (org-html--textarea-block example-block) | 2699 | (org-html--textarea-block example-block) |
| 2700 | (if-let ((class-val (plist-get attributes :class))) | 2700 | (if-let* ((class-val (plist-get attributes :class))) |
| 2701 | (setq attributes (plist-put attributes :class (concat "example " class-val))) | 2701 | (setq attributes (plist-put attributes :class (concat "example " class-val))) |
| 2702 | (setq attributes (plist-put attributes :class "example"))) | 2702 | (setq attributes (plist-put attributes :class "example"))) |
| 2703 | (format "<pre%s>\n%s</pre>" | 2703 | (format "<pre%s>\n%s</pre>" |
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 79df1fe119e..4d0935b073d 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el | |||
| @@ -4097,7 +4097,7 @@ a communication channel." | |||
| 4097 | (unless (hash-table-p table-head-cache) | 4097 | (unless (hash-table-p table-head-cache) |
| 4098 | (setq table-head-cache (make-hash-table :test #'eq)) | 4098 | (setq table-head-cache (make-hash-table :test #'eq)) |
| 4099 | (plist-put info :org-latex-table-head-cache table-head-cache)) | 4099 | (plist-put info :org-latex-table-head-cache table-head-cache)) |
| 4100 | (if-let ((head-contents (gethash (org-element-parent table-row) table-head-cache))) | 4100 | (if-let* ((head-contents (gethash (org-element-parent table-row) table-head-cache))) |
| 4101 | (puthash (org-element-parent table-row) (concat head-contents "\\\\\n" contents) | 4101 | (puthash (org-element-parent table-row) (concat head-contents "\\\\\n" contents) |
| 4102 | table-head-cache) | 4102 | table-head-cache) |
| 4103 | (puthash (org-element-parent table-row) contents table-head-cache)))) | 4103 | (puthash (org-element-parent table-row) contents table-head-cache)))) |
diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 7cdf622ec44..fd8bfa1114a 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el | |||
| @@ -2672,7 +2672,7 @@ from tree." | |||
| 2672 | (let ((type (org-element-type data))) | 2672 | (let ((type (org-element-type data))) |
| 2673 | (if (org-export--skip-p data info selected excluded) | 2673 | (if (org-export--skip-p data info selected excluded) |
| 2674 | (if (memq type '(table-cell table-row)) (push data ignore) | 2674 | (if (memq type '(table-cell table-row)) (push data ignore) |
| 2675 | (if-let ((keep-spaces (org-export--keep-spaces data info))) | 2675 | (if-let* ((keep-spaces (org-export--keep-spaces data info))) |
| 2676 | ;; Keep spaces in place of removed | 2676 | ;; Keep spaces in place of removed |
| 2677 | ;; element, if necessary. | 2677 | ;; element, if necessary. |
| 2678 | ;; Example: "Foo.[10%] Bar" would become | 2678 | ;; Example: "Foo.[10%] Bar" would become |
| @@ -3456,7 +3456,7 @@ file." | |||
| 3456 | (with-temp-buffer | 3456 | (with-temp-buffer |
| 3457 | (let ((org-inhibit-startup t) | 3457 | (let ((org-inhibit-startup t) |
| 3458 | (lines | 3458 | (lines |
| 3459 | (if-let ((location (plist-get parameters :location))) | 3459 | (if-let* ((location (plist-get parameters :location))) |
| 3460 | (org-export--inclusion-absolute-lines | 3460 | (org-export--inclusion-absolute-lines |
| 3461 | file location | 3461 | file location |
| 3462 | (plist-get parameters :only-contents) | 3462 | (plist-get parameters :only-contents) |