Stefan Monnier <[email protected]> writes:

so those lambdas don't use the old dynbind dialect of ELisp and so the compiler gets to see (and compile) this part of the code.

Hello Stefan,

Thanks for taking a look at Org commits!

Since we're talking about quoting functions, how likely do you think these patches are to break stuff?

The first one doesn't even change the generated byte-code so I assume that's pretty safe.

The second one is what you've suggested here but applied blindly to our entire code base.

I addressed the new warnings and our tests seem to still pass.

Thanks!

Morgan


Supersedes: https://list.orgmode.org/ch3pr84mb3424a038505f83d6f77c4606c5...@ch3pr84mb3424.namprd84.prod.outlook.com

>From c0180432192ad360eb8ee860e9942c8f38d9c773 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Mon, 11 Aug 2025 12:32:10 -0400
Subject: [PATCH 1/2] Do not quote function names

This enables more compile time warnings but examining the byte code
before and after shows no difference.

* doc/org-manual.org (Emacs Lisp forms as formulas):
* lisp/ob-C.el (org-babel-C-execute, org-babel-C-expand-C)
(org-babel-C-expand-D):
* lisp/ob-R.el: (org-babel-expand-body:R) (org-babel-execute:R):
(org-babel-R-quote-tsv-field, org-babel-R-assign-elisp)
(ob-session-async-org-babel-R-evaluate-session):
* lisp/ob-core.el (org-babel-show-result-all, org-babel-put-colnames):
* lisp/ob-fortran.el:
(org-babel-execute:fortran, org-babel-expand-body:fortran):
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars)
(org-babel-gnuplot-quote-tsv-field):
* lisp/ob-java.el: (org-babel-expand-body:java):
* lisp/ob-js.el (org-babel-js-initiate-session):
* lisp/ob-maxima.el (org-babel-maxima-expand):
* lisp/ob-octave.el: (org-babel-execute:octave):
* lisp/ob-screen.el: (org-babel-prep-session:screen):
(org-babel-screen-session-execute-string):
* lisp/ob-sql.el: (org-babel-expand-body:sql):
* lisp/ob-sqlite.el: (org-babel-expand-body:sqlite):
* lisp/ol-bbdb.el (org-bbdb-format-vevent):
* lisp/ol-man.el (org-man-open):
* lisp/ol.el (org-store-link, org-insert-link):
* lisp/org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command, org-agenda-run-series)
(org-agenda-view-mode-dispatch, org-agenda-next-line)
(org-agenda-previous-line, org-agenda-todo, org-agenda-set-tags)
(org-agenda-set-property, org-agenda-set-effort)
(org-agenda-toggle-archive-tag, org-agenda-bulk-mark-regexp)
(org-agenda-capture):
* lisp/org-archive.el (org-add-archive-files, org-archive-subtree):
* lisp/org-attach.el (org-attach-attach-cp, org-attach-attach-mv)
(org-attach-attach-ln, org-attach-attach-lns):
* lisp/org-capture.el (org-capture-refile)
(org-capture--expand-keyword-in-embedded-elisp):
* lisp/org-compat.el (org-dvipng-color-format, org-kill-new):
* lisp/org-ctags.el:
* lisp/org-cycle.el (org-cycle-force-archived):
* lisp/org-element.el (org-element-inlinetask-interpreter)
(org-element-clock-interpreter):
* lisp/org-feed.el (org-feed-make-indented-block):
* lisp/org-id.el (org-id-locations-load, org-id-alist-to-hash):
* lisp/org-macs.el (org-buffer-list):
* lisp/org-mobile.el (org-mobile-files-alist, org-mobile-push)
(org-mobile-create-index-file, org-mobile-get-outline-path-link)
(org-mobile-bodies-same-p):
* lisp/org-plot.el (org-plot-quote-tsv-field):
* lisp/org-table.el (org-table-create-with-table.el)
(org-table-create, org-table-eval-formula)
(org-table-message-once-per-second, org-table-fedit-lisp-indent)
(org-table-remove-rectangle-highlight, org-table-overlay-coordinates)
(org-table-toggle-coordinate-overlays)
(org-table-transpose-table-at-point, org-table-sum)
(org-table-show-reference, orgtbl-ctrl-c-ctrl-c)
(orgtbl-create-or-convert-from-region):
* lisp/org-timer.el (org-timer-start):
* lisp/org.el (org-set-font-lock-defaults, org-todo)
(org-fast-todo-selection, org-sparse-tree, org-fast-tag-insert)
(org-fast-tag-selection, org-property-get-allowed-values)
(org-read-date-get-relative, org-make-tdiff-string)
(org-timestamp-change, org-agenda-files, org-agenda-file-to-front)
(org-cdlatex-underscore-caret, org-cdlatex-math-modify)
(org-self-insert-command, org-transpose-words, org-shifttab)
(org-shiftmetaleft, org-shiftmetaright, org-shiftmetaup)
(org-shiftmetadown, org-metaleft, org-metaright, org-metaup)
(org-metadown, org-shiftup, org-shiftdown, org-shiftright)
(org-shiftleft, org-shiftcontrolright, org-shiftcontrolleft)
(org-ctrl-c-ret, org-edit-special, org-ctrl-c-ctrl-c, org-ctrl-c-star)
(org-ctrl-c-minus, org-install-agenda-files-menu, org-reload)
(org-quote-csv-field, org-mark-subtree, org-insert-comment)
(org-reftex-citation, org-kill-line):
* lisp/ox-ascii.el (org-ascii-clock, org-ascii-table-row):
* lisp/ox-beamer.el (org-beamer-allowed-property-values):
* lisp/ox-html.el (org-html--make-attribute-string):
* lisp/ox-latex.el (org-latex-planning, org-latex-src-block--minted)
(org-latex-src-block--engraved, org-latex-src-block--listings)
(org-latex--align-string, org-latex--align-string-tabbing):
* lisp/ox-odt.el (org-odt--build-date-styles)
(org-odt-format-headline--wrap, org-odt--enumerate)
(org-odt--render-image/formula, org-odt-link--infer-description)
(org-odt-hfy-face-to-css, org-odt-table)
(org-odt--translate-description-lists, org-odt--translate-list-tables)
(org-odt-export-as-odf-and-open):
* lisp/ox.el (org-export--dispatch-ui):
* testing/lisp/test-ol.el (test-ol-with-link-parameters-as):
* testing/lisp/test-org-table.el (test-org-table/empty-field)
(test-org-table/org-lookup-all):
* testing/lisp/test-org-tempo.el (test-org-tempo/completion):
* testing/lisp/test-org.el (test-org/with-electric-indent)
(test-org/without-electric-indent, test-org/sort-entries):

Use "#'" instead of "'".  Silence any new compile warnings using
'declare-function'.
---
 doc/org-manual.org             |   2 +-
 lisp/ob-C.el                   |  14 +--
 lisp/ob-R.el                   |  16 +--
 lisp/ob-core.el                |   4 +-
 lisp/ob-fortran.el             |   6 +-
 lisp/ob-gnuplot.el             |   4 +-
 lisp/ob-java.el                |   2 +-
 lisp/ob-js.el                  |   3 +-
 lisp/ob-maxima.el              |   4 +-
 lisp/ob-octave.el              |   2 +-
 lisp/ob-screen.el              |   4 +-
 lisp/ob-sql.el                 |   2 +-
 lisp/ob-sqlite.el              |   2 +-
 lisp/ol-bbdb.el                |   2 +-
 lisp/ol-man.el                 |   2 +-
 lisp/ol.el                     |   4 +-
 lisp/org-agenda.el             |  76 ++++++-------
 lisp/org-archive.el            |   4 +-
 lisp/org-attach.el             |   8 +-
 lisp/org-capture.el            |   4 +-
 lisp/org-compat.el             |   4 +-
 lisp/org-ctags.el              |   2 +-
 lisp/org-cycle.el              |   2 +-
 lisp/org-element.el            |   4 +-
 lisp/org-feed.el               |   2 +-
 lisp/org-id.el                 |   4 +-
 lisp/org-macs.el               |   2 +-
 lisp/org-mobile.el             |  22 ++--
 lisp/org-plot.el               |   2 +-
 lisp/org-table.el              |  35 +++---
 lisp/org-timer.el              |   2 +-
 lisp/org.el                    | 193 +++++++++++++++++----------------
 lisp/ox-ascii.el               |   4 +-
 lisp/ox-beamer.el              |   2 +-
 lisp/ox-html.el                |   2 +-
 lisp/ox-latex.el               |  18 +--
 lisp/ox-odt.el                 |  36 +++---
 lisp/ox.el                     |   2 +-
 testing/lisp/test-ol.el        |   2 +-
 testing/lisp/test-org-table.el |  12 +-
 testing/lisp/test-org-tempo.el |   4 +-
 testing/lisp/test-org.el       |  28 ++---
 42 files changed, 278 insertions(+), 271 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 1434a4fcc..f0f1165e3 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -2355,7 +2355,7 @@ *** Emacs Lisp forms as formulas
 inserted as space-separated fields, so they can be embedded in list or
 vector syntax.  For example:
 
-: '(apply '+ '($1..$4));N
+: '(apply #'+ '($1..$4));N
 
 #+texinfo: @noindent
 computes the sum of columns 1 to 4, like Calc's =vsum($1..$4)=.
diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 7ed706f61..9ebd09754 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -141,7 +141,7 @@ org-babel-C-execute
 	 (cmdline (cdr (assq :cmdline params)))
 	 (cmdline (if cmdline (concat " " cmdline) ""))
 	 (flags (cdr (assq :flags params)))
-	 (flags (mapconcat 'identity
+	 (flags (mapconcat #'identity
 			   (if (listp flags) flags (list flags)) " "))
 	 (libs (org-babel-read
 		(or (cdr (assq :libs params))
@@ -233,7 +233,7 @@ org-babel-C-expand-C
            (and prologue (concat prologue "\n"))
            body
            (and epilogue (concat "\n" epilogue "\n"))))
-    (mapconcat 'identity
+    (mapconcat #'identity
 	       (list
 		;; includes
 		(mapconcat
@@ -255,9 +255,9 @@ org-babel-C-expand-C
 		 namespaces
 		 "\n")
 		;; variables
-		(mapconcat 'org-babel-C-var-to-C vars "\n")
+		(mapconcat #'org-babel-C-var-to-C vars "\n")
 		;; table sizes
-		(mapconcat 'org-babel-C-table-sizes-to-C vars "\n")
+		(mapconcat #'org-babel-C-table-sizes-to-C vars "\n")
 		;; tables headers utility
 		(when colnames
 		  (org-babel-C-utility-header-to-C))
@@ -285,7 +285,7 @@ org-babel-C-expand-D
     (when (stringp imports)
       (setq imports (split-string imports)))
     (setq imports (append imports '("std.stdio" "std.conv")))
-    (mapconcat 'identity
+    (mapconcat #'identity
 	       (list
 		"module mmm;"
 		;; imports
@@ -293,9 +293,9 @@ org-babel-C-expand-D
 		 (lambda (inc) (format "import %s;" inc))
 		 imports "\n")
 		;; variables
-		(mapconcat 'org-babel-C-var-to-C vars "\n")
+		(mapconcat #'org-babel-C-var-to-C vars "\n")
 		;; table sizes
-		(mapconcat 'org-babel-C-table-sizes-to-C vars "\n")
+		(mapconcat #'org-babel-C-table-sizes-to-C vars "\n")
 		;; tables headers utility
 		(when colnames
 		  (org-babel-C-utility-header-to-C))
diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 0e3fa5880..53a5a1950 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -147,7 +147,7 @@ ob-R-transfer-variable-table-without-header
 
 (defun org-babel-expand-body:R (body params &optional _graphics-file)
   "Expand BODY according to PARAMS, return the expanded body."
-  (mapconcat 'identity
+  (mapconcat #'identity
 	     (append
 	      (when (cdr (assq :prologue params))
 		(list (cdr (assq :prologue params))))
@@ -173,7 +173,7 @@ org-babel-execute:R
 	   (full-body
 	    (let ((inside
 		   (list (org-babel-expand-body:R body params graphics-file))))
-	      (mapconcat 'identity
+	      (mapconcat #'identity
 			 (if graphics-file
 			     (append
 			      (list (org-babel-R-construct-graphics-device-call
@@ -238,17 +238,17 @@ org-babel-variable-assignments:R
 (defun org-babel-R-quote-tsv-field (s)
   "Quote field S for export to R."
   (if (stringp s)
-      (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"")
+      (concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"") "\"")
     (format "%S" s)))
 
 (defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
   "Construct R code assigning the elisp VALUE to a variable named NAME."
   (if (listp value)
-      (let* ((lengths (mapcar 'length (cl-remove-if-not 'listp value)))
-	     (max (if lengths (apply 'max lengths) 0))
-	     (min (if lengths (apply 'min lengths) 0)))
+      (let* ((lengths (mapcar #'length (cl-remove-if-not 'listp value)))
+	     (max (if lengths (apply #'max lengths) 0))
+	     (min (if lengths (apply #'min lengths) 0)))
         ;; Ensure VALUE has an orgtbl structure (depth of at least 2).
-        (unless (listp (car value)) (setq value (mapcar 'list value)))
+        (unless (listp (car value)) (setq value (mapcar #'list value)))
 	(let ((file (orgtbl-to-tsv
                      value
                      '( :fmt org-babel-R-quote-tsv-field
@@ -505,7 +505,7 @@ ob-session-async-org-babel-R-evaluate-session
        (with-temp-buffer
 	 (insert
 	  (mapconcat
-           'org-babel-chomp
+           #'org-babel-chomp
            (list (format org-babel-R-write-object-command
                          (if row-names-p "TRUE" "FALSE")
                          (if column-names-p
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 3e218c418..6c5a54190 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1624,7 +1624,7 @@ org-babel-result-hide-all
 
 (defun org-babel-show-result-all ()
   "Unfold all results in the current buffer."
-  (mapc 'delete-overlay org-babel-hide-result-overlays)
+  (mapc #'delete-overlay org-babel-hide-result-overlays)
   (setq org-babel-hide-result-overlays nil))
 
 ;;;###autoload
@@ -1909,7 +1909,7 @@ org-babel-get-rownames
 
 (defun org-babel-put-colnames (table colnames)
   "Add COLNAMES to TABLE if they exist."
-  (if colnames (apply 'list colnames 'hline table) table))
+  (if colnames (apply #'list colnames 'hline table) table))
 
 (defun org-babel-put-rownames (table rownames)
   "Add ROWNAMES to TABLE if they exist."
diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el
index 9c5f2852b..dc8fc42d7 100644
--- a/lisp/ob-fortran.el
+++ b/lisp/ob-fortran.el
@@ -63,7 +63,7 @@ org-babel-execute:fortran
      (format "%s -o %s %s %s"
 	     org-babel-fortran-compiler
 	     (org-babel-process-file-name tmp-bin-file)
-	     (mapconcat 'identity
+	     (mapconcat #'identity
 			(if (listp flags) flags (list flags)) " ")
 	     (org-babel-process-file-name tmp-src-file)) "")
     (let ((results
@@ -93,7 +93,7 @@ org-babel-expand-body:fortran
         (defines (org-babel-read
                   (or (cdr (assq :defines params))
                       (org-babel-read (org-entry-get nil "defines" t))))))
-    (mapconcat 'identity
+    (mapconcat #'identity
 	       (delq nil
 		(list
 		 ;; includes
@@ -111,7 +111,7 @@ org-babel-expand-body:fortran
 		     (org-babel-fortran-ensure-main-wrap
 		      (concat
 		       ;; variables
-		       (mapconcat 'org-babel-fortran-var-to-fortran vars "\n")
+		       (mapconcat #'org-babel-fortran-var-to-fortran vars "\n")
                        (and prologue (concat prologue "\n"))
 		       body
                        (and prologue (concat prologue "\n")))
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index 33e2c23ef..ab4fe537a 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -97,7 +97,7 @@ org-babel-gnuplot-process-vars
 	      (org-babel-gnuplot-table-to-data
 	       (let* ((first  (car val))
 		      (tablep (or (listp first) (symbolp first))))
-		 (if tablep val (mapcar 'list val)))
+		 (if tablep val (mapcar #'list val)))
                ;; Make temporary file name stable with respect to data.
                ;; If we do not do it, :cache argument becomes useless.
                (org-babel-temp-stable-file (cons val params) "gnuplot-")
@@ -283,7 +283,7 @@ org-babel-gnuplot-quote-tsv-field
       (if (zerop (length s))
 	  (or *org-babel-gnuplot-missing* s)
 	(if (string-match "[ \"]" s)
-	    (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
+	    (concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"")
 		    "\"")
 	  s)))))
 
diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 3c9a93915..b6bda31bf 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -377,7 +377,7 @@ org-babel-expand-body:java
       (when var-lines
         (goto-char (point-min))
         (org-babel-java--move-past org-babel-java--class-re)   ; move inside class
-        (insert (mapconcat 'identity var-lines "\n"))
+        (insert (mapconcat #'identity var-lines "\n"))
         (insert "\n"))
 
       ;; add imports from source block headers
diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index d025886fb..996178df1 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -186,11 +186,12 @@ org-babel-js-initiate-session
    ;; SIC, JavaScript miscapitalized in `js-comint.el'.
    ((string= "*Javascript REPL*" session)
     (org-require-package 'js-comint)
+    (declare-function run-js "ext:js-comint" ())
     (let ((session-buffer "*Javascript REPL*"))
       (if (and (org-babel-comint-buffer-livep (get-buffer session-buffer))
 	       (comint-check-proc session-buffer))
 	  session-buffer
-	(call-interactively 'run-js)
+	(call-interactively #'run-js)
 	(sit-for .5)
 	session-buffer)))
    ((string= "mozrepl" org-babel-js-cmd)
diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el
index a55fcc695..4fef82085 100644
--- a/lisp/ob-maxima.el
+++ b/lisp/ob-maxima.el
@@ -86,7 +86,7 @@ org-babel-maxima-expand
          (graphic-file (ignore-errors (org-babel-graphical-output-file params)))
 	 (epilogue (cdr (assq :epilogue params)))
 	 (prologue (cdr (assq :prologue params))))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (delq nil
 	             (list
 		      ;; Any code from the specified prologue at the start.
@@ -99,7 +99,7 @@ org-babel-maxima-expand
                                  (graphic-file (if (eq graphics-pkg 'plot) graphic-file (file-name-sans-extension graphic-file))))
                             (format graphic-format-string graphic-terminal graphic-file)))
 		      ;; variables
-		      (mapconcat 'org-babel-maxima-var-to-maxima vars "\n")
+		      (mapconcat #'org-babel-maxima-var-to-maxima vars "\n")
 		      ;; body
 		      body
 		      ;; Any code from the specified epilogue at the end.
diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 5fb571329..627b2a270 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -88,7 +88,7 @@ org-babel-execute:octave
 	 (result (org-babel-octave-evaluate
 		  session
 		  (if gfx-file
-		      (mapconcat 'identity
+		      (mapconcat #'identity
 				 (list
 				  "set (0, \"defaultfigurevisible\", \"off\");"
 				  full-body
diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el
index d2e553c5c..2a6b282b5 100644
--- a/lisp/ob-screen.el
+++ b/lisp/ob-screen.el
@@ -65,7 +65,7 @@ org-babel-prep-session:screen
          (terminal (cdr (assq :terminal params)))
          (screenrc (cdr (assq :screenrc params)))
          (process-name (concat "org-babel: terminal (" session ")")))
-    (apply 'start-process process-name "*Messages*"
+    (apply #'start-process process-name "*Messages*"
            terminal `("-T" ,(concat "org-babel: " session) "-e" ,org-babel-screen-location
 		      "-c" ,screenrc "-mS" ,session ,cmd))
     ;; XXX: Is there a better way than the following?
@@ -80,7 +80,7 @@ org-babel-screen-session-execute-string
   (let ((socket (org-babel-screen-session-socketname session)))
     (when socket
       (let ((tmpfile (org-babel-screen-session-write-temp-file session body)))
-        (apply 'start-process (concat "org-babel: screen (" session ")") "*Messages*"
+        (apply #'start-process (concat "org-babel: screen (" session ")") "*Messages*"
                org-babel-screen-location
                `("-S" ,socket "-X" "eval" "msgwait 0"
 		 ,(concat "readreg z " tmpfile)
diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index a227aa31c..bd9f194e1 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -99,7 +99,7 @@ org-babel-expand-body:sql
   "Expand BODY according to the values of PARAMS."
   (let ((prologue (cdr (assq :prologue params)))
 	(epilogue (cdr (assq :epilogue params))))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (delq nil (list prologue
                                (org-babel-sql-expand-vars
                                 body (org-babel--get-vars params))
diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el
index e1a37b56b..f2f2f1278 100644
--- a/lisp/ob-sqlite.el
+++ b/lisp/ob-sqlite.el
@@ -58,7 +58,7 @@ org-babel-expand-body:sqlite
   "Expand BODY according to the values of PARAMS."
   (let ((prologue (cdr (assq :prologue params)))
 	(epilogue (cdr (assq :epilogue params))))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (delq nil (list prologue
                                (org-babel-sql-expand-vars
                                 body (org-babel--get-vars params) t)
diff --git a/lisp/ol-bbdb.el b/lisp/ol-bbdb.el
index a83996d08..3e2a2da4b 100644
--- a/lisp/ol-bbdb.el
+++ b/lisp/ol-bbdb.el
@@ -536,7 +536,7 @@ org-bbdb-format-vevent
 RRULE:FREQ=YEARLY
 END:VEVENT\n"
 		     (nth 0 rec) (nth 0 key) (nth 1 key)
-		     (mapconcat 'identity
+		     (mapconcat #'identity
 				(org-split-string (nth 1 rec) "[^a-zA-Z0-90]+")
 				"-")
 		     (nth 0 rec) (nth 0 key) (nth 1 key)
diff --git a/lisp/ol-man.el b/lisp/ol-man.el
index 2121b8539..52a9917a4 100644
--- a/lisp/ol-man.el
+++ b/lisp/ol-man.el
@@ -61,7 +61,7 @@ org-man-open
                       command
                     ;; Older Emacs without the fix - escape the
                     ;; arguments ourselves.
-                    (mapconcat 'identity
+                    (mapconcat #'identity
                                (mapcar #'shell-quote-argument
                                        (split-string command "\\s-+"))
                                " ")))
diff --git a/lisp/ol.el b/lisp/ol.el
index 3b15df020..aca44c69d 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -2680,7 +2680,7 @@ org-store-link
           (while (< (line-end-position) end)
 	    (move-end-of-line 1) (activate-mark)
 	    (let (current-prefix-arg)
-	      (call-interactively 'org-store-link))
+	      (call-interactively #'org-store-link))
 	    (move-beginning-of-line 2)
 	    (set-mark (point)))))
     (setq org-store-link-plist nil)
@@ -2982,7 +2982,7 @@ org-insert-link
                     ;; Allow description completion.  Avoid "nil" option
                     ;; in the case of `completing-read-default' when
                     ;; some links have no description.
-                    (delq nil (mapcar 'cadr org-stored-links)))
+                    (delq nil (mapcar #'cadr org-stored-links)))
 		   nil nil nil
 		   'org-link--history
 		   (caar org-stored-links)))
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 1fa976b67..325646b59 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3066,14 +3066,14 @@ org-agenda
        ((equal org-keys "C")
 	(setq org-agenda-custom-commands org-agenda-custom-commands-orig)
 	(customize-variable 'org-agenda-custom-commands))
-       ((equal org-keys "a") (call-interactively 'org-agenda-list))
-       ((equal org-keys "s") (call-interactively 'org-search-view))
-       ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg '(4))))
-       ((equal org-keys "t") (call-interactively 'org-todo-list))
-       ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg '(4))))
-       ((equal org-keys "m") (call-interactively 'org-tags-view))
-       ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4))))
-       ((equal org-keys "e") (call-interactively 'org-store-agenda-views))
+       ((equal org-keys "a") (call-interactively #'org-agenda-list))
+       ((equal org-keys "s") (call-interactively #'org-search-view))
+       ((equal org-keys "S") (org-call-with-arg #'org-search-view (or arg '(4))))
+       ((equal org-keys "t") (call-interactively #'org-todo-list))
+       ((equal org-keys "T") (org-call-with-arg #'org-todo-list (or arg '(4))))
+       ((equal org-keys "m") (call-interactively #'org-tags-view))
+       ((equal org-keys "M") (org-call-with-arg #'org-tags-view (or arg '(4))))
+       ((equal org-keys "e") (call-interactively #'org-store-agenda-views))
        ((equal org-keys "?") (org-tags-view nil "+FLAGGED")
 	(add-hook
 	 'post-command-hook
@@ -3089,8 +3089,8 @@ org-agenda
 			       (copy-sequence note))
 			      nil 'face 'org-warning))))))
 	 t t))
-       ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects))
-       ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files))
+       ((equal org-keys "#") (call-interactively #'org-agenda-list-stuck-projects))
+       ((equal org-keys "/") (call-interactively #'org-occur-in-agenda-files))
        ((equal org-keys "!") (customize-variable 'org-stuck-projects))
        (t (user-error "Invalid agenda key"))))))
 
@@ -3290,7 +3290,7 @@ org-agenda-get-restriction-and-command
 				          (cons (substring (car x) 1) (cdr x))))
 				      custom))))
 	       ((eq c ?*)
-	        (call-interactively 'org-toggle-sticky-agenda)
+	        (call-interactively #'org-toggle-sticky-agenda)
 	        (sit-for 2))
 	       ((and (not restrict-ok) (memq c '(?1 ?0 ?<)))
 	        (message "Restriction is only possible in Org buffers")
@@ -3373,15 +3373,15 @@ org-agenda-run-series
           (cl-progv (append gvars lvars) (append gvals lvals)
 	    (pcase type
 	      (`agenda
-	       (call-interactively 'org-agenda-list))
+	       (call-interactively #'org-agenda-list))
 	      (`agenda*
-	       (funcall 'org-agenda-list nil nil nil t))
+	       (funcall #'org-agenda-list nil nil nil t))
 	      (`alltodo
-	       (call-interactively 'org-todo-list))
+	       (call-interactively #'org-todo-list))
 	      (`search
 	       (org-search-view current-prefix-arg match nil))
 	      (`stuck
-	       (call-interactively 'org-agenda-list-stuck-projects))
+	       (call-interactively #'org-agenda-list-stuck-projects))
 	      (`tags
 	       (org-tags-view current-prefix-arg match))
 	      (`tags-todo
@@ -8832,23 +8832,23 @@ org-agenda-view-mode-dispatch
        time[G]rid   [[]inactive  [f]ollow      [l]og    [L]og-all   [c]lockcheck
        [a]rch-trees [A]rch-files clock[R]eport include[D]iary       [E]ntryText")
   (pcase (read-char-exclusive)
-    (?\ (call-interactively 'org-agenda-reset-view))
-    (?d (call-interactively 'org-agenda-day-view))
-    (?w (call-interactively 'org-agenda-week-view))
-    (?t (call-interactively 'org-agenda-fortnight-view))
-    (?m (call-interactively 'org-agenda-month-view))
-    (?y (call-interactively 'org-agenda-year-view))
-    (?l (call-interactively 'org-agenda-log-mode))
+    (?\ (call-interactively #'org-agenda-reset-view))
+    (?d (call-interactively #'org-agenda-day-view))
+    (?w (call-interactively #'org-agenda-week-view))
+    (?t (call-interactively #'org-agenda-fortnight-view))
+    (?m (call-interactively #'org-agenda-month-view))
+    (?y (call-interactively #'org-agenda-year-view))
+    (?l (call-interactively #'org-agenda-log-mode))
     (?L (org-agenda-log-mode '(4)))
     (?c (org-agenda-log-mode 'clockcheck))
-    ((or ?F ?f) (call-interactively 'org-agenda-follow-mode))
-    (?a (call-interactively 'org-agenda-archives-mode))
+    ((or ?F ?f) (call-interactively #'org-agenda-follow-mode))
+    (?a (call-interactively #'org-agenda-archives-mode))
     (?A (org-agenda-archives-mode 'files))
-    ((or ?R ?r) (call-interactively 'org-agenda-clockreport-mode))
-    ((or ?E ?e) (call-interactively 'org-agenda-entry-text-mode))
-    (?G (call-interactively 'org-agenda-toggle-time-grid))
-    (?D (call-interactively 'org-agenda-toggle-diary))
-    (?\! (call-interactively 'org-agenda-toggle-deadlines))
+    ((or ?R ?r) (call-interactively #'org-agenda-clockreport-mode))
+    ((or ?E ?e) (call-interactively #'org-agenda-entry-text-mode))
+    (?G (call-interactively #'org-agenda-toggle-time-grid))
+    (?D (call-interactively #'org-agenda-toggle-diary))
+    (?\! (call-interactively #'org-agenda-toggle-deadlines))
     (?\[ (let ((org-agenda-include-inactive-timestamps t))
 	   (org-agenda-check-type t 'agenda)
 	   (org-agenda-redo))
@@ -9220,13 +9220,13 @@ org-agenda-update-agenda-type
 (defun org-agenda-next-line ()
   "Move cursor to the next line, and show if follow mode is active."
   (interactive nil org-agenda-mode)
-  (call-interactively 'next-line)
+  (call-interactively #'next-line)
   (org-agenda-do-context-action))
 
 (defun org-agenda-previous-line ()
   "Move cursor to the previous line, and show if follow mode is active."
   (interactive nil org-agenda-mode)
-  (call-interactively 'previous-line)
+  (call-interactively #'previous-line)
   (org-agenda-do-context-action))
 
 (defun org-agenda-next-item (n)
@@ -9787,7 +9787,7 @@ org-agenda-todo
 	 (goto-char pos)
 	 (org-fold-show-context 'agenda)
 	 (let ((current-prefix-arg arg))
-	   (call-interactively 'org-todo)
+	   (call-interactively #'org-todo)
            ;; Make sure that log is recorded in current undo.
            (when (and org-log-setup
                       (not (eq org-log-note-how 'note)))
@@ -9992,7 +9992,7 @@ org-agenda-set-tags
   (interactive nil org-agenda-mode)
   (org-agenda-check-no-diary)
   (if (and (org-region-active-p) (called-interactively-p 'any))
-      (call-interactively 'org-change-tag-in-region)
+      (call-interactively #'org-change-tag-in-region)
     (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
 			 (org-agenda-error)))
 	   (buffer (marker-buffer hdmarker))
@@ -10029,7 +10029,7 @@ org-agenda-set-property
 	 (widen)
 	 (goto-char pos)
 	 (org-fold-show-context 'agenda)
-	 (call-interactively 'org-set-property))))))
+	 (call-interactively #'org-set-property))))))
 
 (defun org-agenda-set-effort ()
   "Set the effort property for the current headline."
@@ -10048,7 +10048,7 @@ org-agenda-set-effort
 	 (widen)
 	 (goto-char pos)
 	 (org-fold-show-context 'agenda)
-	 (call-interactively 'org-set-effort)
+	 (call-interactively #'org-set-effort)
 	 (end-of-line 1)
 	 (setq newhead (org-get-heading)))
        (org-agenda-change-all-lines newhead hdmarker)))))
@@ -10070,7 +10070,7 @@ org-agenda-toggle-archive-tag
 	 (widen)
 	 (goto-char pos)
 	 (org-fold-show-context 'agenda)
-	 (call-interactively 'org-toggle-archive-tag)
+	 (call-interactively #'org-toggle-archive-tag)
 	 (end-of-line 1)
 	 (setq newhead (org-get-heading)))
        (org-agenda-change-all-lines newhead hdmarker)
@@ -10751,7 +10751,7 @@ org-agenda-bulk-mark-regexp
 	    (forward-line 1)
 	  (when (string-match-p regexp txt-at-point)
 	    (setq entries-marked (1+ entries-marked))
-	    (call-interactively 'org-agenda-bulk-mark)))))
+	    (call-interactively #'org-agenda-bulk-mark)))))
     (unless entries-marked
       (message "No entry matching this regexp."))))
 
@@ -11055,7 +11055,7 @@ org-agenda-capture
       (user-error "You cannot do this outside of agenda buffers")
     (let ((org-overriding-default-time
 	   (org-get-cursor-date (equal with-time 1))))
-      (call-interactively 'org-capture))))
+      (call-interactively #'org-capture))))
 
 ;;; Dragging agenda lines forward/backward
 
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index e7c46f647..ba7edd161 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -176,7 +176,7 @@ org-add-archive-files
 archive file is."
   (seq-uniq
    (apply
-    'append
+    #'append
     (mapcar
      (lambda (f)
        (if (not (file-exists-p f))
@@ -333,7 +333,7 @@ org-archive-subtree
 		  ;; Force the mode for future visits.
 		  (let ((org-insert-mode-line-in-empty-file t)
 		        (org-inhibit-startup t))
-		    (call-interactively 'org-mode)))
+		    (call-interactively #'org-mode)))
 	      (when (and newfile-p org-archive-file-header-format)
 	        (goto-char (point-max))
 	        (insert (format org-archive-file-header-format
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 07366afb0..9f1804d5b 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -655,24 +655,24 @@ org-attach-attach
 (defun org-attach-attach-cp ()
   "Attach a file by copying it."
   (interactive nil org-mode)
-  (let ((org-attach-method 'cp)) (call-interactively 'org-attach-attach)))
+  (let ((org-attach-method 'cp)) (call-interactively #'org-attach-attach)))
 (defun org-attach-attach-mv ()
   "Attach a file by moving (renaming) it."
   (interactive nil org-mode)
-  (let ((org-attach-method 'mv)) (call-interactively 'org-attach-attach)))
+  (let ((org-attach-method 'mv)) (call-interactively #'org-attach-attach)))
 (defun org-attach-attach-ln ()
   "Attach a file by creating a hard link to it.
 Beware that this does not work on systems that do not support hard links.
 On some systems, this apparently does copy the file instead."
   (interactive nil org-mode)
-  (let ((org-attach-method 'ln)) (call-interactively 'org-attach-attach)))
+  (let ((org-attach-method 'ln)) (call-interactively #'org-attach-attach)))
 (defun org-attach-attach-lns ()
   "Attach a file by creating a symbolic link to it.
 
 Beware that this does not work on systems that do not support symbolic links.
 On some systems, this apparently does copy the file instead."
   (interactive nil org-mode)
-  (let ((org-attach-method 'lns)) (call-interactively 'org-attach-attach)))
+  (let ((org-attach-method 'lns)) (call-interactively #'org-attach-attach)))
 
 (defun org-attach-new (file)
   "Create a new attachment FILE for the current outline node.
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 448a4243c..e759bdf30 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1034,7 +1034,7 @@ org-capture-refile
       (save-window-excursion
         (with-current-buffer base
 	  (org-with-point-at pos
-	    (call-interactively 'org-refile)))))
+	    (call-interactively #'org-refile)))))
     (when kill-buffer
       (with-current-buffer base (save-buffer))
       (kill-buffer base))
@@ -2154,7 +2154,7 @@ org-capture--expand-keyword-in-embedded-elisp
 Such keywords are prefixed with \"%:\".  See
 `org-capture-template' for more information."
   (cond ((consp attr)
-	 (mapcar 'org-capture--expand-keyword-in-embedded-elisp attr))
+	 (mapcar #'org-capture--expand-keyword-in-embedded-elisp attr))
 	((symbolp attr)
 	 (let* ((attr-symbol (symbol-name attr))
 		(key (and (string-match "%\\(:.*\\)" attr-symbol)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index cf199b6b9..6247b66fe 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -826,7 +826,7 @@ org-dvipng-color
 (defun org-dvipng-color-format (color-name)
   "Convert COLOR-NAME to a RGB color value for dvipng."
   (apply #'format "rgb %s %s %s"
-         (mapcar 'org-normalize-color
+         (mapcar #'org-normalize-color
                  (color-values color-name))))
 (make-obsolete
  'org-dvipng-color "to be removed" "10.0")
@@ -2058,7 +2058,7 @@ org-count-lines
 (defun org-kill-new (string &rest args)
   (remove-text-properties 0 (length string) '(line-prefix t wrap-prefix t)
                           string)
-  (apply 'kill-new string args))
+  (apply #'kill-new string args))
 
 ;;;###autoload
 (defmacro org-check-version ()
diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el
index 3a6b08ccc..a6d9b0c6a 100644
--- a/lisp/org-ctags.el
+++ b/lisp/org-ctags.el
@@ -137,7 +137,7 @@
 ;;
 ;;     (progn
 ;;       (message "-- rebuilding tags tables...")
-;;       (mapc 'org-ctags-create-tags tags-table-list))
+;;       (mapc #'org-ctags-create-tags tags-table-list))
 
 ;;; Code:
 
diff --git a/lisp/org-cycle.el b/lisp/org-cycle.el
index 437637bc2..1a9a3a3ed 100644
--- a/lisp/org-cycle.el
+++ b/lisp/org-cycle.el
@@ -450,7 +450,7 @@ org-cycle-force-archived
   (interactive nil org-mode)
   (setq this-command 'org-cycle)
   (let ((org-cycle-open-archived-trees t))
-    (call-interactively 'org-cycle)))
+    (call-interactively #'org-cycle)))
 
 (defun org-cycle-internal-global ()
   "Do the global cycling action."
diff --git a/lisp/org-element.el b/lisp/org-element.el
index c9dc1045a..5cc9546f0 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -1793,7 +1793,7 @@ org-element-inlinetask-interpreter
 		 (org-element-property :title inlinetask)))
 	 (tags (let ((tag-list (org-element-property :tags inlinetask)))
 		 (and tag-list
-		      (format ":%s:" (mapconcat 'identity tag-list ":")))))
+		      (format ":%s:" (mapconcat #'identity tag-list ":")))))
 	 (task (concat (make-string level ?*)
 		       (and todo (concat " " todo))
 		       (and priority (format " [#%s]" (org-priority-to-string priority)))
@@ -2445,7 +2445,7 @@ org-element-clock-interpreter
 	  (let ((duration (org-element-property :duration clock)))
 	    (and duration
 		 (concat " => "
-			 (apply 'format
+			 (apply #'format
 				"%2s:%02s"
 				(org-split-string duration ":")))))))
 
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index f22c4b95e..7d4281ecb 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -587,7 +587,7 @@ org-feed-make-indented-block
   "Add indentation of N spaces to a multiline string S."
   (if (not (string-match "\n" s))
       s
-    (mapconcat 'identity
+    (mapconcat #'identity
                (org-split-string s "\n")
                (concat "\n" (make-string n ?\ )))))
 
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 75b7e8266..c063d9802 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -659,7 +659,7 @@ org-id-locations-load
 	(error
          (message "Could not read `org-id-locations' from %s, setting it to nil"
 		  org-id-locations-file))))
-    (setq org-id-files (mapcar 'car org-id-locations))
+    (setq org-id-files (mapcar #'car org-id-locations))
     (setq org-id-locations (org-id-alist-to-hash org-id-locations))))
 
 (defun org-id-add-location (id file)
@@ -693,7 +693,7 @@ org-id-alist-to-hash
   "Turn an org-id location LIST into a hash table."
   (let ((res (make-hash-table
 	      :test 'equal
-	      :size (apply '+ (mapcar 'length list))))
+	      :size (apply #'+ (mapcar #'length list))))
 	f)
     (mapc
      (lambda (x)
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 0b79e231c..dfd6554f0 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -374,7 +374,7 @@ org-buffer-list
 If EXCLUDE-TMP is non-nil, ignore temporary buffers."
   (let* ((bfn nil)
 	 (agenda-files (and (eq predicate 'agenda)
-			    (mapcar 'file-truename (org-agenda-files t))))
+			    (mapcar #'file-truename (org-agenda-files t))))
 	 (filter
 	  (cond
 	   ((eq predicate 'files)
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index c8c7b8955..bf6afd7a4 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -284,7 +284,7 @@ org-mobile-files-alist
 	       (member 'agenda-archives	org-agenda-text-search-extra-files)
 	       t))
 	 (files
-	  (apply 'append
+	  (apply #'append
 		 (mapcar
 		  (lambda (f)
 		    (cond
@@ -346,7 +346,7 @@ org-mobile-push
 	  (org-mobile-prepare-file-lists)
 	  (message "Creating agendas...")
 	  (let ((inhibit-redisplay t)
-		(org-agenda-files (mapcar 'car org-mobile-files-alist)))
+		(org-agenda-files (mapcar #'car org-mobile-files-alist)))
 	    (org-mobile-create-sumo-agenda))
 	  (message "Creating agendas...done")
 	  (org-save-all-org-buffers) ; to save any IDs created by this process
@@ -439,13 +439,13 @@ org-mobile-create-index-file
 	todo-kwds done-kwds tags)
     (when (stringp (car def-todo))
       (setq def-todo (list (cons 'sequence def-todo))))
-    (org-agenda-prepare-buffers (mapcar 'car files-alist))
+    (org-agenda-prepare-buffers (mapcar #'car files-alist))
     (setq done-kwds (org-uniquify org-done-keywords-for-agenda))
     (setq todo-kwds (org-delete-all
 		     done-kwds
 		     (org-uniquify org-todo-keywords-for-agenda)))
-    (setq tags (mapcar 'car (org-global-tags-completion-table
-			     (mapcar 'car files-alist))))
+    (setq tags (mapcar #'car (org-global-tags-completion-table
+			     (mapcar #'car files-alist))))
     (with-temp-file (if org-mobile-use-encryption org-mobile-encryption-tempfile
 		      target-file)
       (insert "#+READONLY\n")
@@ -461,13 +461,13 @@ org-mobile-create-index-file
 	    (setq todo-kwds (org-delete-all twds todo-kwds))
 	    (setq done-kwds (org-delete-all dwds done-kwds)))))
       (when (or todo-kwds done-kwds)
-	(insert "#+TODO: " (mapconcat 'identity todo-kwds " ") " | "
-		(mapconcat 'identity done-kwds " ") "\n"))
+	(insert "#+TODO: " (mapconcat #'identity todo-kwds " ") " | "
+		(mapconcat #'identity done-kwds " ") "\n"))
       (setq def-tags (split-string (org-tag-alist-to-string def-tags t)))
       (setq tags (org-delete-all def-tags tags))
       (setq tags (sort tags (lambda (a b) (string< (downcase a) (downcase b)))))
       (setq tags (append def-tags tags nil))
-      (insert "#+TAGS: " (mapconcat 'identity tags " ") "\n")
+      (insert "#+TAGS: " (mapconcat #'identity tags " ") "\n")
       (insert "#+ALLPRIORITIES: " org-mobile-allpriorities "\n")
       (when (file-exists-p (expand-file-name
 			    "agendas.org" org-mobile-directory))
@@ -676,7 +676,7 @@ org-mobile-get-outline-path-link
     (concat "olp:"
 	    (org-mobile-escape-olp (file-name-nondirectory buffer-file-name))
 	    ":"
-	    (mapconcat 'org-mobile-escape-olp
+	    (mapconcat #'org-mobile-escape-olp
 		       (org-get-outline-path)
 		       "/")
 	    "/"
@@ -1131,8 +1131,8 @@ org-mobile-bodies-same-p
    ((and (not a) (not b)) t)
    ((or (not a) (not b)) nil)
    (t (setq a (org-trim a) b (org-trim b))
-      (setq a (mapconcat 'identity (org-split-string a "[ \t]*\n[ \t]*") "\n"))
-      (setq b (mapconcat 'identity (org-split-string b "[ \t]*\n[ \t]*") "\n"))
+      (setq a (mapconcat #'identity (org-split-string a "[ \t]*\n[ \t]*") "\n"))
+      (setq b (mapconcat #'identity (org-split-string b "[ \t]*\n[ \t]*") "\n"))
       (equal a b))))
 
 (provide 'org-mobile)
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 59ce5dc11..66b924944 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -123,7 +123,7 @@ org-plot-quote-tsv-field
   (if (string-match org-table-number-regexp s) s
     (if (string-match org-ts-regexp3 s)
 	(org-plot-quote-timestamp-field s)
-      (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\""))))
+      (concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"") "\""))))
 
 (defun org-plot/gnuplot-to-data (table data-file params)
   "Export TABLE to DATA-FILE in a format readable by gnuplot.
diff --git a/lisp/org-table.el b/lisp/org-table.el
index d720553ec..69d2eb317 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -68,6 +68,7 @@
 (declare-function org-indent-line "org" ())
 (declare-function org-load-modules-maybe "org" (&optional force))
 (declare-function org-restart-font-lock "org" ())
+(declare-function org-return "org" (&optional indent arg interactive))
 (declare-function org-sort-remove-invisible "org" (s))
 (declare-function org-time-stamp-format "org" (&optional long inactive custom))
 (declare-function org-time-string-to-absolute "org" (s &optional daynr prefer buffer pos))
@@ -812,7 +813,7 @@ org-table-create-with-table.el
 	 (y-or-n-p "Convert table to table.el table? "))
     (org-table-align)
     (org-table-convert))
-   (t (call-interactively 'table-insert))))
+   (t (call-interactively #'table-insert))))
 
 ;;;###autoload
 (defun org-table-create-or-convert-from-region (arg)
@@ -843,7 +844,7 @@ org-table-create
 	 (split (org-split-string size " *x *"))
 	 (rows (string-to-number (nth 1 split)))
 	 (columns (string-to-number (car split)))
-	 (line (concat (apply 'concat indent "|" (make-list columns "  |"))
+	 (line (concat (apply #'concat indent "|" (make-list columns "  |"))
 		       "\n")))
     (if (string-match "^[ \t]*$" (buffer-substring-no-properties
                                   (line-beginning-position) (point)))
@@ -2709,7 +2710,7 @@ org-table-eval-formula
 		  ;; agenda.
 		  (t (replace-regexp-in-string org-ts-regexp "[\\1]" ev)))))
 	(if (and down (> ndown 0) (looking-at ".*\n[ \t]*|[^-]"))
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	  (setq ndown 0)))
       (and down (org-table-maybe-recalculate-line))
       (or suppress-align (and org-table-may-need-update
@@ -2926,7 +2927,7 @@ org-table-message-once-per-second
 T1 is nil, always messages."
   (let ((curtime (current-time)))
     (if (or (not t1) (time-less-p 1 (time-subtract curtime t1)))
-	(progn (apply 'message args)
+	(progn (apply #'message args)
 	       curtime)
       t1)))
 
@@ -3739,7 +3740,7 @@ org-table-fedit-lisp-indent
     (cond
      ((looking-at "[ \t]")
       (goto-char pos)
-      (call-interactively 'lisp-indent-line))
+      (call-interactively #'lisp-indent-line))
      ((looking-at "[$&@<>.0-9a-zA-Z]+ *= *[^ \t\n']") (goto-char pos))
      ((looking-at "[$&@<>.0-9a-zA-Z]+ *= *'(")
       (goto-char (- (match-end 0) 2))
@@ -3847,7 +3848,7 @@ org-table-remove-rectangle-highlight
   "Remove the rectangle overlays."
   (unless org-inhibit-highlight-removal
     (remove-hook 'before-change-functions 'org-table-remove-rectangle-highlight)
-    (mapc 'delete-overlay org-table-rectangle-overlays)
+    (mapc #'delete-overlay org-table-rectangle-overlays)
     (setq org-table-rectangle-overlays nil)))
 
 (defvar-local org-table-coordinate-overlays nil
@@ -3859,7 +3860,7 @@ org-table-overlay-coordinates
   ;; FIXME: This should probably not be interactive command.
   ;; Instead, users should call `org-table-toggle-coordinate-overlays'.
   (interactive)
-  (mapc 'delete-overlay org-table-coordinate-overlays)
+  (mapc #'delete-overlay org-table-coordinate-overlays)
   (setq org-table-coordinate-overlays nil)
   (save-excursion
     (let ((id 0) (ih 0) hline eol str ov)
@@ -3896,7 +3897,7 @@ org-table-toggle-coordinate-overlays
     (when (and (org-at-table-p) org-table-overlay-coordinates)
       (org-table-align))
     (unless org-table-overlay-coordinates
-      (mapc 'delete-overlay org-table-coordinate-overlays)
+      (mapc #'delete-overlay org-table-coordinate-overlays)
       (setq org-table-coordinate-overlays nil))
     (message "Tables Row/Column numbers display turned %s"
 	     (if org-table-overlay-coordinates "on" "off"))))
@@ -4730,7 +4731,7 @@ org-table-transpose-table-at-point
     (delete-region (point) (org-table-end))
     (insert (mapconcat
 	     (lambda(x)
-	       (concat "| " (mapconcat 'identity x " | " ) "  |\n" ))
+	       (concat "| " (mapconcat #'identity x " | " ) "  |\n" ))
 	     contents ""))
     (org-table-goto-line col_old)
     (org-table-goto-column dline_old))
@@ -4861,7 +4862,7 @@ org-table-sum
 	  (user-error "No table data"))
 	(org-table-goto-column col)
 	(setq end (point))))
-      (let* ((items (apply 'append (org-table-copy-region beg end)))
+      (let* ((items (apply #'append (org-table-copy-region beg end)))
 	     (items1 (cond ((not nlast) items)
 			   ((>= nlast (length items)) items)
 			   (t (setq items (reverse items))
@@ -4869,7 +4870,7 @@ org-table-sum
 			      (nreverse items))))
 	     (numbers (delq nil (mapcar #'org-table--number-for-summing
 					items1)))
-	     (res (apply '+ numbers))
+	     (res (apply #'+ numbers))
 	     (sres (if (= org-timecnt 0)
 		       (number-to-string res)
 		     (setq diff (* 3600 res)
@@ -5116,8 +5117,8 @@ org-table-show-reference
 					     org-table-fedit-scroll-down))))
 	  (push pos org-show-positions)
 	  (push table-start org-show-positions)
-	  (let ((min (apply 'min org-show-positions))
-		(max (apply 'max org-show-positions)))
+	  (let ((min (apply #'min org-show-positions))
+		(max (apply #'max org-show-positions)))
 	    (set-window-start (selected-window) min)
 	    (goto-char max)
 	    (or (pos-visible-in-window-p max)
@@ -5409,9 +5410,9 @@ orgtbl-ctrl-c-ctrl-c
       (goto-char action)
       (org-table-maybe-eval-formula)
       (if arg
-	  (call-interactively 'org-table-recalculate)
+	  (call-interactively #'org-table-recalculate)
 	(org-table-maybe-recalculate-line))
-      (call-interactively 'org-table-align)
+      (call-interactively #'org-table-align)
       (when (orgtbl-send-table 'maybe)
 	(run-hooks 'orgtbl-after-send-table-hook)))
      ((eq action 'recalc)
@@ -5419,7 +5420,7 @@ orgtbl-ctrl-c-ctrl-c
 	(forward-line 0)
 	(skip-chars-backward " \r\n\t")
 	(if (org-at-table-p)
-	    (org-call-with-arg 'org-table-recalculate t))))
+	    (org-call-with-arg #'org-table-recalculate t))))
      (t (let (orgtbl-mode)
 	  (call-interactively (key-binding "\C-c\C-c")))))))
 
@@ -5431,7 +5432,7 @@ orgtbl-create-or-convert-from-region
   (let* (orgtbl-mode (cmd (key-binding "\C-c|")))
     (if cmd
 	(call-interactively cmd)
-      (call-interactively 'org-table-create-or-convert-from-region))))
+      (call-interactively #'org-table-create-or-convert-from-region))))
 
 (defun orgtbl-tab (arg)
   "Justification and field motion for `orgtbl-mode'."
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 8eb6a8eb7..c27bda4c2 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -123,7 +123,7 @@ org-timer-start
   (interactive "P")
   (cond
    ((equal offset '(16))
-    (call-interactively 'org-timer-change-times-in-region))
+    (call-interactively #'org-timer-change-times-in-region))
    (org-timer-countdown-timer
     (user-error "Countdown timer is running.  Cancel first"))
    (t
diff --git a/lisp/org.el b/lisp/org.el
index 026f3784a..ed1077ff1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -164,8 +164,11 @@ org-priority-regexp
 (declare-function calendar-check-holidays "holidays" (date))
 (declare-function cdlatex-environment "ext:cdlatex" (environment item))
 (declare-function cdlatex-math-symbol "ext:cdlatex")
+(declare-function cdlatex-math-modify "ext:cdlatex")
+(declare-function cdlatex-sub-superscript "ext:cdlatex")
 (declare-function Info-goto-node "info" (nodename &optional fork strict-case))
 (declare-function isearch-no-upper-case-p "isearch" (string regexp-flag))
+(declare-function feature-file "loadhist" (feature))
 (declare-function org-add-archive-files "org-archive" (files))
 (declare-function org-agenda-entry-get-agenda-timestamp "org-agenda" (pom))
 (declare-function org-agenda-todo-yesterday "org-agenda" (&optional arg))
@@ -243,6 +246,8 @@ org-priority-regexp
 (declare-function org-goto "org-goto" (&optional alternative-interface))
 (declare-function org-id-get-create "org-id" (&optional force))
 (declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
+(declare-function org-inlinetask-demote "org-inlinetask" ())
+(declare-function org-inlinetask-promote "org-inlinetask" ())
 (declare-function org-latex-make-preamble "ox-latex" (info &optional template snippet?))
 (declare-function org-num-mode "org-num" (&optional arg))
 (declare-function org-plot/gnuplot "org-plot" (&optional params))
@@ -5974,7 +5979,7 @@ org-set-font-lock-defaults
 	    (list (format org-heading-keyword-regexp-format
 			  (concat
 			   "\\(?:"
-			   (mapconcat 'regexp-quote org-not-done-keywords "\\|")
+			   (mapconcat #'regexp-quote org-not-done-keywords "\\|")
 			   "\\)"))
 		  '(2 'org-headline-todo prepend)))
 	  ;; DONE
@@ -5982,7 +5987,7 @@ org-set-font-lock-defaults
 	    (list (format org-heading-keyword-regexp-format
 			  (concat
 			   "\\(?:"
-			   (mapconcat 'regexp-quote org-done-keywords "\\|")
+			   (mapconcat #'regexp-quote org-done-keywords "\\|")
 			   "\\)"))
 		  '(2 'org-headline-done prepend)))
 	  ;; Priorities
@@ -5994,7 +5999,7 @@ org-set-font-lock-defaults
 	  ;; Tags groups
 	  (when (and org-group-tags org-tag-groups-alist)
 	    (list (concat org-outline-regexp-bol ".+\\(:"
-			  (regexp-opt (mapcar 'car org-tag-groups-alist))
+			  (regexp-opt (mapcar #'car org-tag-groups-alist))
 			  ":\\).*$")
 		  '(1 'org-tag-group prepend)))
 	  ;; Special keywords (as a part of planning)
@@ -9706,7 +9711,7 @@ org-todo
 		       (- (length org-todo-sets) -1
 			  (length (memq (assoc org-state org-todo-sets) org-todo-sets)))
 		       (length org-todo-sets)
-		       (mapconcat 'identity (assoc org-state org-todo-sets) " ")))
+		       (mapconcat #'identity (assoc org-state org-todo-sets) " ")))
 	    (setq org-last-todo-state-is-todo
 		  (not (member org-state org-done-keywords)))
 	    (setq now-done-p (and (member org-state org-done-keywords)
@@ -10163,7 +10168,7 @@ org-fast-todo-selection
              1 ; ensure that there is at least one space between adjacent todo fields.
              3 ; FIXME: likely coped from `org-fast-tag-selection'
              ;; The longest todo keyword.
-             (apply 'max (mapcar
+             (apply #'max (mapcar
 			  (lambda (x)
 			    (if (stringp (car x)) (string-width (car x)) 0))
 			  org-todo-key-alist))))
@@ -11161,13 +11166,13 @@ org-sparse-tree
 	arg
 	(cadr
 	 (memq type '(nil all scheduled deadline active inactive closed)))))
-      (?d (call-interactively 'org-check-deadlines))
-      (?b (call-interactively 'org-check-before-date))
-      (?a (call-interactively 'org-check-after-date))
-      (?D (call-interactively 'org-check-dates-range))
-      (?t (call-interactively 'org-show-todo-tree))
+      (?d (call-interactively #'org-check-deadlines))
+      (?b (call-interactively #'org-check-before-date))
+      (?a (call-interactively #'org-check-after-date))
+      (?D (call-interactively #'org-check-dates-range))
+      (?t (call-interactively #'org-show-todo-tree))
       (?T (org-show-todo-tree '(4)))
-      (?m (call-interactively 'org-match-sparse-tree))
+      (?m (call-interactively #'org-match-sparse-tree))
       ((?p ?P)
        (let* ((kwd (completing-read
 		    "Property: " (mapcar #'list (org-buffer-property-keys))))
@@ -11179,7 +11184,7 @@ org-sparse-tree
 	 (unless (string-match "\\`{.*}\\'" value)
 	   (setq value (concat "\"" value "\"")))
 	 (org-match-sparse-tree arg (concat kwd "=" value))))
-      ((?r ?R ?/) (call-interactively 'org-occur))
+      ((?r ?R ?/) (call-interactively #'org-occur))
       (otherwise (user-error "No such sparse tree command \"%c\"" answer)))))
 
 (defvar-local org-occur-highlights nil
@@ -12352,7 +12357,7 @@ org-fast-tag-insert
   "Insert KWD, and the TAGS, the latter with face FACE.
 Also insert END."
   (insert (format "%-12s" (concat kwd ":"))
-	  (org-add-props (mapconcat 'identity tags " ") nil 'face face)
+	  (org-add-props (mapconcat #'identity tags " ") nil 'face face)
 	  (or end "")))
 
 (defun org-fast-tag-show-exit (flag)
@@ -12699,7 +12704,7 @@ org-fast-tag-selection
         (delete-overlay org-tags-overlay)
         ;; Return the new tag list.
         (if rtn
-	    (mapconcat 'identity current-tags ":")
+	    (mapconcat #'identity current-tags ":")
 	  nil)))))
 
 (defun org-make-tag-string (tags)
@@ -13962,7 +13967,7 @@ org-property-get-allowed-values
     (when (member ":ETC" vals)
       (setq vals (remove ":ETC" vals))
       (org-add-props (car vals) '(org-unrestricted t)))
-    (if table (mapcar 'list vals) vals)))
+    (if table (mapcar #'list vals) vals)))
 
 (defun org-property-previous-allowed-value (&optional _previous)
   "Switch to the next allowed value for this property."
@@ -14682,7 +14687,7 @@ org-read-date-get-relative
 	    (concat
 	     "\\`[ \t]*\\([-+]\\{0,2\\}\\)"
 	     "\\([0-9]+\\)?"
-	     "\\([hdwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?"
+	     "\\([hdwmy]\\|\\(" (mapconcat #'car parse-time-weekdays "\\|") "\\)\\)?"
 	     "\\([ \t]\\|$\\)") s))
 	 (or (> (match-end 1) (match-beginning 1)) (match-end 4)))
     (let* ((dir (if (> (match-end 1) (match-beginning 1))
@@ -15167,7 +15172,7 @@ org-make-tdiff-string
     (when (> m 0)
       (setq fmt (concat fmt "%d minute" (if (> m 1) "s" "") " "))
       (push m l))
-    (apply 'format fmt (nreverse l))))
+    (apply #'format fmt (nreverse l))))
 
 (defun org-time-string-to-time (s)
   "Convert timestamp string S into internal time."
@@ -15711,7 +15716,7 @@ org-timestamp-change
       ;; Maybe adjust the closest clock in `org-clock-history'
       (when org-clock-adjust-closest
 	(if (not (and (org-at-clock-log-p)
-		      (< 1 (length (delq nil (mapcar 'marker-position
+		      (< 1 (length (delq nil (mapcar #'marker-position
 						     org-clock-history))))))
 	    (message "No clock to adjust")
 	  (cond ((save-excursion	; fix previous clock?
@@ -15728,7 +15733,7 @@ org-timestamp-change
 	    (let* ((p (save-excursion (org-back-to-heading t)))
 		   (cl (mapcar (lambda(c) (abs (- (marker-position c) p))) org-clock-history))
 		   (clfixnth
-		    (+ fixnext (- (length cl) (or (length (member (apply 'min cl) cl)) 100))))
+		    (+ fixnext (- (length cl) (or (length (member (apply #'min cl) cl)) 100))))
 		   (clfixpos (unless (> 0 clfixnth) (nth clfixnth org-clock-history))))
 	      (if (not clfixpos)
 		  (message "No clock to adjust")
@@ -15988,7 +15993,7 @@ org-agenda-files
 	  ((stringp org-agenda-files) (org-read-agenda-file-list))
 	  ((listp org-agenda-files) org-agenda-files)
 	  (t (error "Invalid value of `org-agenda-files'")))))
-    (setq files (apply 'append
+    (setq files (apply #'append
 		       (mapcar (lambda (f)
 				 (if (file-directory-p f)
 				     (directory-files
@@ -16113,7 +16118,7 @@ org-agenda-file-to-front
     (if to-end
 	(setq file-alist (append (delq x file-alist) (list x)))
       (setq file-alist (cons x (delq x file-alist))))
-    (org-store-new-agenda-file-list (mapcar 'cdr file-alist))
+    (org-store-new-agenda-file-list (mapcar #'cdr file-alist))
     (org-install-agenda-files-menu)
     (message "File %s to %s of agenda file list"
 	     (if had "moved" "added") (if to-end "end" "front"))))
@@ -16313,7 +16318,7 @@ org-cdlatex-underscore-caret
 Revert to the normal definition outside of these fragments."
   (interactive "P" org-mode)
   (if (org-inside-LaTeX-fragment-p)
-      (call-interactively 'cdlatex-sub-superscript)
+      (call-interactively #'cdlatex-sub-superscript)
     (let (org-cdlatex-mode)
       (call-interactively (key-binding (vector last-input-event))))))
 
@@ -16322,7 +16327,7 @@ org-cdlatex-math-modify
 Revert to the normal definition outside of these fragments."
   (interactive "P" org-mode)
   (if (org-inside-LaTeX-fragment-p)
-      (call-interactively 'cdlatex-math-modify)
+      (call-interactively #'cdlatex-math-modify)
     (let (org-cdlatex-mode)
       (call-interactively (key-binding (vector last-input-event))))))
 
@@ -16503,7 +16508,7 @@ org-self-insert-command
      ((consp org-speed-command)
       (eval org-speed-command t))
      (t (let (org-use-speed-commands)
-	  (call-interactively 'org-self-insert-command)))))
+	  (call-interactively #'org-self-insert-command)))))
    ((and
      (= N 1)
      (not (org-region-active-p))
@@ -16634,7 +16639,7 @@ org-transpose-words
 word constituents."
   (interactive nil org-mode)
   (org-with-syntax-table org-mode-transpose-word-syntax-table
-    (call-interactively 'transpose-words)))
+    (call-interactively #'transpose-words)))
 
 (defvar org-ctrl-c-ctrl-c-hook nil
   "Hook for functions attaching themselves to \\`C-c C-c'.
@@ -16797,7 +16802,7 @@ org-shifttab
 When ARG is a numeric prefix, show contents of this level."
   (interactive "P" org-mode)
   (cond
-   ((org-at-table-p) (call-interactively 'org-table-previous-field))
+   ((org-at-table-p) (call-interactively #'org-table-previous-field))
    ((integerp arg)
     (let ((arg2 (if org-odd-levels-only (1- (* 2 arg)) arg)))
       (message "Content view to level: %d" arg)
@@ -16805,7 +16810,7 @@ org-shifttab
       (org-cycle-show-empty-lines t)
       (setq org-cycle-global-status 'overview)
       (run-hook-with-args 'org-cycle-hook 'overview)))
-   (t (call-interactively 'org-cycle-global))))
+   (t (call-interactively #'org-cycle-global))))
 
 (defun org-shiftmetaleft ()
   "Promote subtree or delete table column.
@@ -16825,12 +16830,12 @@ org-shiftmetaleft
              (and org-support-shift-select (org-region-active-p))))
     (org-call-for-shift-select 'backward-char))
    ((run-hook-with-args-until-success 'org-shiftmetaleft-hook))
-   ((org-at-table-p) (call-interactively 'org-table-delete-column))
-   ((org-at-heading-p) (call-interactively 'org-promote-subtree))
+   ((org-at-table-p) (call-interactively #'org-table-delete-column))
+   ((org-at-heading-p) (call-interactively #'org-promote-subtree))
    ((if (not (org-region-active-p)) (org-at-item-p)
       (save-excursion (goto-char (region-beginning))
 		      (org-at-item-p)))
-    (call-interactively 'org-outdent-item-tree))
+    (call-interactively #'org-outdent-item-tree))
    ((run-hook-with-args-until-success 'org-shiftmetaleft-final-hook))
    (t (org-modifier-cursor-error))))
 
@@ -16852,12 +16857,12 @@ org-shiftmetaright
              (and org-support-shift-select (org-region-active-p))))
     (org-call-for-shift-select 'forward-char))
    ((run-hook-with-args-until-success 'org-shiftmetaright-hook))
-   ((org-at-table-p) (call-interactively 'org-table-insert-column))
-   ((org-at-heading-p) (call-interactively 'org-demote-subtree))
+   ((org-at-table-p) (call-interactively #'org-table-insert-column))
+   ((org-at-heading-p) (call-interactively #'org-demote-subtree))
    ((if (not (org-region-active-p)) (org-at-item-p)
       (save-excursion (goto-char (region-beginning))
 		      (org-at-item-p)))
-    (call-interactively 'org-indent-item-tree))
+    (call-interactively #'org-indent-item-tree))
    ((run-hook-with-args-until-success 'org-shiftmetaright-final-hook))
    (t (org-modifier-cursor-error))))
 
@@ -16876,11 +16881,11 @@ org-shiftmetaup
   (interactive "P" org-mode)
   (cond
    ((run-hook-with-args-until-success 'org-shiftmetaup-hook))
-   ((org-at-table-p) (call-interactively 'org-table-kill-row))
+   ((org-at-table-p) (call-interactively #'org-table-kill-row))
    ((org-at-clock-log-p) (let ((org-clock-adjust-closest t))
-			   (call-interactively 'org-timestamp-up)))
+			   (call-interactively #'org-timestamp-up)))
    ((run-hook-with-args-until-success 'org-shiftmetaup-final-hook))
-   (t (call-interactively 'org-drag-line-backward))))
+   (t (call-interactively #'org-drag-line-backward))))
 
 (defun org-shiftmetadown (&optional _arg)
   "Drag the line at point down.
@@ -16897,11 +16902,11 @@ org-shiftmetadown
   (interactive "P" org-mode)
   (cond
    ((run-hook-with-args-until-success 'org-shiftmetadown-hook))
-   ((org-at-table-p) (call-interactively 'org-table-insert-row))
+   ((org-at-table-p) (call-interactively #'org-table-insert-row))
    ((org-at-clock-log-p) (let ((org-clock-adjust-closest t))
-			   (call-interactively 'org-timestamp-down)))
+			   (call-interactively #'org-timestamp-down)))
    ((run-hook-with-args-until-success 'org-shiftmetadown-final-hook))
-   (t (call-interactively 'org-drag-line-forward))))
+   (t (call-interactively #'org-drag-line-forward))))
 
 (defsubst org-hidden-tree-error ()
   (user-error
@@ -16922,7 +16927,7 @@ org-metaleft
   (interactive "P" org-mode)
   (cond
    ((run-hook-with-args-until-success 'org-metaleft-hook))
-   ((org-at-table-p) (org-call-with-arg 'org-table-move-column 'left))
+   ((org-at-table-p) (org-call-with-arg #'org-table-move-column 'left))
    ((org-with-limited-levels
      (or (org-at-heading-p)
 	 (and (org-region-active-p)
@@ -16930,19 +16935,19 @@ org-metaleft
 		(goto-char (region-beginning))
 		(org-at-heading-p)))))
     (when (org-check-for-hidden 'headlines) (org-hidden-tree-error))
-    (call-interactively 'org-do-promote))
+    (call-interactively #'org-do-promote))
    ;; At an inline task.
    ((org-at-heading-p)
-    (call-interactively 'org-inlinetask-promote))
+    (call-interactively #'org-inlinetask-promote))
    ((or (org-at-item-p)
 	(and (org-region-active-p)
 	     (save-excursion
 	       (goto-char (region-beginning))
 	       (org-at-item-p))))
     (when (org-check-for-hidden 'items) (org-hidden-tree-error))
-    (call-interactively 'org-outdent-item))
+    (call-interactively #'org-outdent-item))
    ((run-hook-with-args-until-success 'org-metaleft-final-hook))
-   (t (call-interactively 'backward-word))))
+   (t (call-interactively #'backward-word))))
 
 (defun org-metaright (&optional _arg)
   "Demote heading, list item at point or move table column right.
@@ -16961,9 +16966,9 @@ org-metaright
   (interactive "P" org-mode)
   (cond
    ((run-hook-with-args-until-success 'org-metaright-hook))
-   ((org-at-table-p) (call-interactively 'org-table-move-column))
-   ((org-at-drawer-p) (call-interactively 'org-indent-drawer))
-   ((org-at-block-p) (call-interactively 'org-indent-block))
+   ((org-at-table-p) (call-interactively #'org-table-move-column))
+   ((org-at-drawer-p) (call-interactively #'org-indent-drawer))
+   ((org-at-block-p) (call-interactively #'org-indent-block))
    ((org-with-limited-levels
      (or (org-at-heading-p)
 	 (and (org-region-active-p)
@@ -16971,19 +16976,19 @@ org-metaright
 		(goto-char (region-beginning))
 		(org-at-heading-p)))))
     (when (org-check-for-hidden 'headlines) (org-hidden-tree-error))
-    (call-interactively 'org-do-demote))
+    (call-interactively #'org-do-demote))
    ;; At an inline task.
    ((org-at-heading-p)
-    (call-interactively 'org-inlinetask-demote))
+    (call-interactively #'org-inlinetask-demote))
    ((or (org-at-item-p)
 	(and (org-region-active-p)
 	     (save-excursion
 	       (goto-char (region-beginning))
 	       (org-at-item-p))))
     (when (org-check-for-hidden 'items) (org-hidden-tree-error))
-    (call-interactively 'org-indent-item))
+    (call-interactively #'org-indent-item))
    ((run-hook-with-args-until-success 'org-metaright-final-hook))
-   (t (call-interactively 'forward-word))))
+   (t (call-interactively #'forward-word))))
 
 (defun org-check-for-hidden (what)
   "Check if there are hidden headlines/items in the current visual line.
@@ -17051,7 +17056,7 @@ org-metaup
             (user-error "Cannot move past superior level or buffer limit"))
           ;; Drag first subtree above below the selected.
           (while (< (point) end)
-            (call-interactively 'org-move-subtree-down)
+            (call-interactively #'org-move-subtree-down)
             (setq deactivate-mark (org--deactivate-mark)))
           ;; When `org-move-subtree-down' inserts before markers, the
           ;; region boundaries will extend to the moved
@@ -17083,12 +17088,12 @@ org-metaup
       (set-mark c)
       (goto-char (+ c (- b a)))
       (when swap? (exchange-point-and-mark))))
-   ((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up))
+   ((org-at-table-p) (org-call-with-arg #'org-table-move-row 'up))
    ((and (featurep 'org-inlinetask)
          (org-inlinetask-in-task-p))
     (org-drag-element-backward))
-   ((org-at-heading-p) (call-interactively 'org-move-subtree-up))
-   ((org-at-item-p) (call-interactively 'org-move-item-up))
+   ((org-at-heading-p) (call-interactively #'org-move-subtree-up))
+   ((org-at-item-p) (call-interactively #'org-move-item-up))
    ((run-hook-with-args-until-success 'org-metaup-final-hook))
    (t (org-drag-element-backward))))
 
@@ -17126,7 +17131,7 @@ org-metadown
             (user-error "Cannot move past superior level or buffer limit"))
           ;; Drag first subtree below above the selected.
           (while (> (point) beg)
-            (call-interactively 'org-move-subtree-up)
+            (call-interactively #'org-move-subtree-up)
             (setq deactivate-mark (org--deactivate-mark)))))))
    ((org-region-active-p)
     (let* ((a (save-excursion
@@ -17149,12 +17154,12 @@ org-metadown
       (set-mark (+ 1 a (- d c)))
       (goto-char (+ 1 a (- d c) (- b a)))
       (when swap? (exchange-point-and-mark))))
-   ((org-at-table-p) (call-interactively 'org-table-move-row))
+   ((org-at-table-p) (call-interactively #'org-table-move-row))
    ((and (featurep 'org-inlinetask)
          (org-inlinetask-in-task-p))
     (org-drag-element-forward))
-   ((org-at-heading-p) (call-interactively 'org-move-subtree-down))
-   ((org-at-item-p) (call-interactively 'org-move-item-down))
+   ((org-at-heading-p) (call-interactively #'org-move-subtree-down))
+   ((org-at-item-p) (call-interactively #'org-move-item-down))
    ((run-hook-with-args-until-success 'org-metadown-final-hook))
    (t (org-drag-element-forward))))
 
@@ -17185,9 +17190,9 @@ org-shiftup
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 org-priority-enable-commands
 	 (org-at-heading-p))
-    (call-interactively 'org-priority-up))
+    (call-interactively #'org-priority-up))
    ((and (not org-support-shift-select) (org-at-item-p))
-    (call-interactively 'org-previous-item))
+    (call-interactively #'org-previous-item))
    ((org-clocktable-try-shift 'up arg))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-table-p))
@@ -17225,9 +17230,9 @@ org-shiftdown
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 org-priority-enable-commands
 	 (org-at-heading-p))
-    (call-interactively 'org-priority-down))
+    (call-interactively #'org-priority-down))
    ((and (not org-support-shift-select) (org-at-item-p))
-    (call-interactively 'org-next-item))
+    (call-interactively #'org-next-item))
    ((org-clocktable-try-shift 'down arg))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-table-p))
@@ -17263,22 +17268,22 @@ org-shiftright
     (org-call-for-shift-select 'forward-char))
    ((and (not (eq org-support-shift-select 'everywhere))
          (org-at-timestamp-p 'lax))
-    (call-interactively 'org-timestamp-up-day))
+    (call-interactively #'org-timestamp-up-day))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-heading-p))
     (let ((org-inhibit-logging
 	   (not org-treat-S-cursor-todo-selection-as-state-change))
 	  (org-inhibit-blocking
 	   (not org-treat-S-cursor-todo-selection-as-state-change)))
-      (org-call-with-arg 'org-todo 'right)))
+      (org-call-with-arg #'org-todo 'right)))
    ((or (and org-support-shift-select
 	     (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	     (org-at-item-bullet-p))
 	(and (not org-support-shift-select) (org-at-item-p)))
-    (org-call-with-arg 'org-cycle-list-bullet nil))
+    (org-call-with-arg #'org-cycle-list-bullet nil))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-property-p))
-    (call-interactively 'org-property-next-allowed-value))
+    (call-interactively #'org-property-next-allowed-value))
    ((org-clocktable-try-shift 'right arg))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-table-p))
@@ -17314,22 +17319,22 @@ org-shiftleft
     (org-call-for-shift-select 'backward-char))
    ((and (not (eq org-support-shift-select 'everywhere))
          (org-at-timestamp-p 'lax))
-    (call-interactively 'org-timestamp-down-day))
+    (call-interactively #'org-timestamp-down-day))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-heading-p))
     (let ((org-inhibit-logging
 	   (not org-treat-S-cursor-todo-selection-as-state-change))
 	  (org-inhibit-blocking
 	   (not org-treat-S-cursor-todo-selection-as-state-change)))
-      (org-call-with-arg 'org-todo 'left)))
+      (org-call-with-arg #'org-todo 'left)))
    ((or (and org-support-shift-select
 	     (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	     (org-at-item-bullet-p))
 	(and (not org-support-shift-select) (org-at-item-p)))
-    (org-call-with-arg 'org-cycle-list-bullet 'previous))
+    (org-call-with-arg #'org-cycle-list-bullet 'previous))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-property-p))
-    (call-interactively 'org-property-previous-allowed-value))
+    (call-interactively #'org-property-previous-allowed-value))
    ((org-clocktable-try-shift 'left arg))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-table-p))
@@ -17347,7 +17352,7 @@ org-shiftcontrolright
     (org-call-for-shift-select 'forward-word))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-heading-p))
-    (org-call-with-arg 'org-todo 'nextset))
+    (org-call-with-arg #'org-todo 'nextset))
    (org-support-shift-select
     (org-call-for-shift-select 'forward-word))
    (t (org-shiftselect-error))))
@@ -17360,7 +17365,7 @@ org-shiftcontrolleft
     (org-call-for-shift-select 'backward-word))
    ((and (not (memq org-support-shift-select '(always except-timestamps everywhere)))
 	 (org-at-heading-p))
-    (org-call-with-arg 'org-todo 'previousset))
+    (org-call-with-arg #'org-todo 'previousset))
    (org-support-shift-select
     (org-call-for-shift-select 'backward-word))
    (t (org-shiftselect-error))))
@@ -17419,8 +17424,8 @@ org-ctrl-c-ret
   "Call `org-table-hline-and-move' or `org-insert-heading'."
   (interactive nil org-mode)
   (cond
-   ((org-at-table-p) (call-interactively 'org-table-hline-and-move))
-   (t (call-interactively 'org-insert-heading))))
+   ((org-at-table-p) (call-interactively #'org-table-hline-and-move))
+   (t (call-interactively #'org-insert-heading))))
 
 (defun org-copy-visible (beg end)
   "Copy the visible parts of the region."
@@ -17516,9 +17521,9 @@ org-edit-special
       (`table
        (if (eq (org-element-property :type element) 'table.el)
            (org-edit-table.el)
-         (call-interactively 'org-table-edit-formulas)))
+         (call-interactively #'org-table-edit-formulas)))
       ;; Only Org tables contain `table-row' type elements.
-      (`table-row (call-interactively 'org-table-edit-formulas))
+      (`table-row (call-interactively #'org-table-edit-formulas))
       (`example-block (org-edit-src-code))
       (`export-block (org-edit-export-block))
       (`comment-block (org-edit-comment-block))
@@ -17660,7 +17665,7 @@ org-ctrl-c-ctrl-c
 	   (org-update-dblock)))
 	(`footnote-definition
 	 (goto-char (org-element-post-affiliated context))
-	 (call-interactively 'org-footnote-action))
+	 (call-interactively #'org-footnote-action))
 	(`footnote-reference (call-interactively #'org-footnote-action))
 	((or `headline `inlinetask)
 	 (save-excursion (goto-char (org-element-begin context))
@@ -17785,7 +17790,7 @@ org-ctrl-c-ctrl-c
              (if (org-at-TBLFM-p)
                  (org-table-calc-current-TBLFM)
                (goto-char (org-element-contents-begin context))
-               (org-call-with-arg 'org-table-recalculate (or arg t))
+               (org-call-with-arg #'org-table-recalculate (or arg t))
                (orgtbl-send-table 'maybe))))
           (t
            (org-table-maybe-eval-formula)
@@ -18041,10 +18046,10 @@ org-ctrl-c-star
   (interactive nil org-mode)
   (cond
    ((org-at-table-p)
-    (call-interactively 'org-table-recalculate))
+    (call-interactively #'org-table-recalculate))
    (t
     ;; Convert all lines in region to list items
-    (call-interactively 'org-toggle-heading))))
+    (call-interactively #'org-toggle-heading))))
 
 (defun org-ctrl-c-minus ()
   "Insert separator line in table or modify bullet status of line.
@@ -18054,13 +18059,13 @@ org-ctrl-c-minus
   (interactive nil org-mode)
   (cond
    ((org-at-table-p)
-    (call-interactively 'org-table-insert-hline))
+    (call-interactively #'org-table-insert-hline))
    ((org-region-active-p)
-    (call-interactively 'org-toggle-item))
+    (call-interactively #'org-toggle-item))
    ((org-in-item-p)
-    (call-interactively 'org-cycle-list-bullet))
+    (call-interactively #'org-cycle-list-bullet))
    (t
-    (call-interactively 'org-toggle-item))))
+    (call-interactively #'org-toggle-item))))
 
 (defun org-toggle-heading (&optional nstars)
   "Convert headings to normal text, or items or text to headings.
@@ -18595,7 +18600,7 @@ org-install-agenda-files-menu
 	   ["Cycle Through Files" org-cycle-agenda-files t]
 	   ["Occur in Files" org-occur-in-agenda-files t]
 	   "--")
-	  (mapcar 'org-file-menu-entry
+	  (mapcar #'org-file-menu-entry
 		  ;; Prevent initialization from failing.
 		  (ignore-errors (org-agenda-files t)))))))))
 
@@ -18619,10 +18624,10 @@ org-reload
 	 (remove-re (format "\\`%s\\'"
 			    (regexp-opt '("org" "org-loaddefs" "org-version"))))
 	 (feats (delete-dups
-		 (mapcar 'file-name-sans-extension
-			 (mapcar 'file-name-nondirectory
+		 (mapcar #'file-name-sans-extension
+			 (mapcar #'file-name-nondirectory
 				 (delq nil
-				       (mapcar 'feature-file
+				       (mapcar #'feature-file
 					       features))))))
 	 (lfeat (append
 		 (sort
@@ -18721,7 +18726,7 @@ org-goto-marker-or-bmk
 (defun org-quote-csv-field (s)
   "Quote field for inclusion in CSV material."
   (if (string-match "[\",]" s)
-      (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"")
+      (concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"") "\"")
     s))
 
 (defun org-force-self-insert (N)
@@ -19050,7 +19055,7 @@ org-mark-subtree
 	 (t (outline-previous-visible-heading 1))))
   (when up (while (and (> up 0) (org-up-heading-safe)) (cl-decf up)))
   (if (called-interactively-p 'any)
-      (call-interactively 'org-mark-element)
+      (call-interactively #'org-mark-element)
     (org-mark-element)))
 
 ;;; Indentation
@@ -20052,7 +20057,7 @@ org-insert-comment
 		  (skip-chars-backward " \r\t\n")
 		  (line-beginning-position))
 		(point))))
-      (org-babel-do-in-edit-buffer (call-interactively 'comment-dwim))
+      (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
     (forward-line 0)
     (if (looking-at "\\s-*$") (delete-region (point) (line-end-position))
       (open-line 1))
@@ -20625,7 +20630,7 @@ org-reftex-citation
 	   (user-error "No bibliography defined in file")
 	 (setq bib (concat (match-string 1) ".bib")
 	       org--rds (list (list 'bib bib))))))
-    (call-interactively 'reftex-citation)))
+    (call-interactively #'reftex-citation)))
 
 ;;;; Functions extending outline functionality
 
@@ -20825,7 +20830,7 @@ org-kill-line
        (substitute-command-keys
 	"`\\[org-kill-line]' aborted as it would kill a hidden subtree")))
     (call-interactively
-     (if (bound-and-true-p visual-line-mode) 'kill-visual-line 'kill-line)))
+     (if (bound-and-true-p visual-line-mode) #'kill-visual-line #'kill-line)))
    ((org-match-line org-tag-line-re)
     (let ((end (save-excursion
 		 (goto-char (match-beginning 1))
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 55472e5f9..6f59f30f0 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -1202,7 +1202,7 @@ org-ascii-clock
 	   (let ((time (org-element-property :duration clock)))
 	     (and time
 		  (concat " => "
-			  (apply 'format
+			  (apply #'format
 				 "%2s:%02s"
 				 (org-split-string time ":"))))))
    clock info))
@@ -1969,7 +1969,7 @@ org-ascii-table-row
 	   (lambda (lcorner horiz vert rcorner)
 	     (concat
 	      (apply
-	       'concat
+	       #'concat
 	       (org-element-map table-row 'table-cell
 		 (lambda (cell)
 		   (let ((width (org-ascii--table-cell-width cell info))
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 38da9271e..d6d298369 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -1069,7 +1069,7 @@ org-beamer-allowed-property-values
 	 (not (org-entry-get nil (concat property "_ALL") 'inherit)))
     ;; If no allowed values for BEAMER_env have been defined,
     ;; supply all defined environments
-    (mapcar 'car (append org-beamer-environments-special
+    (mapcar #'car (append org-beamer-environments-special
 			 org-beamer-environments-extra
 			 org-beamer-environments-default)))
    ((and (equal property "BEAMER_col")
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 8bc324a31..f436606f9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1825,7 +1825,7 @@ org-html--make-attribute-string
 ATTRIBUTES is a plist where values are either strings or nil.  An
 attribute with a nil value will be omitted from the result."
   (let (output)
-    (dolist (item attributes (mapconcat 'identity (nreverse output) " "))
+    (dolist (item attributes (mapconcat #'identity (nreverse output) " "))
       (cond ((null item) (pop output))
             ((symbolp item) (push (substring (symbol-name item) 1) output))
             (t (let ((key (car output))
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index cb13e79e9..0197296f0 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3691,7 +3691,7 @@ org-latex-planning
   (concat
    "\\noindent"
    (mapconcat
-    'identity
+    #'identity
     (delq nil
 	  (list
 	   (let ((closed (org-element-property :closed planning)))
@@ -4049,8 +4049,8 @@ org-latex-src-block--minted
            ;; Source code.
            (let* ((code-info (org-export-unravel-code src-block))
                   (max-width
-                   (apply 'max
-                          (mapcar 'string-width
+                   (apply #'max
+                          (mapcar #'string-width
                                   (org-split-string (car code-info)
                                                     "\n")))))
              (org-export-format-code
@@ -4186,8 +4186,8 @@ org-latex-src-block--engraved
          (content
           (let* ((code-info (org-export-unravel-code src-block))
                  (max-width
-                  (apply 'max
-                         (mapcar 'string-width
+                  (apply #'max
+                         (mapcar #'string-width
                                  (org-split-string (car code-info)
                                                    "\n")))))
             (org-export-format-code
@@ -4265,8 +4265,8 @@ org-latex-src-block--listings
       ;; Source code.
       (let* ((code-info (org-export-unravel-code src-block))
              (max-width
-              (apply 'max
-                     (mapcar 'string-width
+              (apply #'max
+                     (mapcar #'string-width
                              (org-split-string (car code-info) "\n")))))
         (org-export-format-code
          (car code-info)
@@ -4385,7 +4385,7 @@ org-latex--align-string
 		      align)
 	        (when (memq 'right borders) (push "|" align))))
 	  info)
-	(apply 'concat (nreverse align)))))
+	(apply #'concat (nreverse align)))))
 
 (defun org-latex--align-string-tabbing (table info)
   "Return LaTeX alignment string using tabbing environment.
@@ -4408,7 +4408,7 @@ org-latex--align-string-tabbing
              (separator
               (format "\\hspace{%s\\textwidth} \\= "
                       (- (/  1.0 count) 0.01))))
-        (concat (apply 'concat (make-list count separator))
+        (concat (apply #'concat (make-list count separator))
                 "\\kill"))))
 
 (defun org-latex--decorate-table (table attributes caption above? info)
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 71a0b7677..c70b61bff 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1266,7 +1266,7 @@ org-odt--build-date-styles
 	      ("%p" . "<number:am-pm/>")
 	      ("%y" . "<number:year number:style=\"short\"/>")))
 	   (case-fold-search nil)
-	   (re (mapconcat 'identity (mapcar 'car fmt-alist) "\\|"))
+	   (re (mapconcat #'identity (mapcar #'car fmt-alist) "\\|"))
 	   match rpl (start 0) (filler-beg 0) filler-end filler output)
       (dolist (pair
 	       '(("\\(?:%[[:digit:]]*N\\)" . "") ; strip ns, us and ns
@@ -1790,7 +1790,7 @@ org-odt-format-headline--wrap
   (let* ((level (+ (org-export-get-relative-level headline info)))
 	 (headline-number (org-export-get-headline-number headline info))
 	 (section-number (and (org-export-numbered-headline-p headline info)
-			      (mapconcat 'number-to-string
+			      (mapconcat #'number-to-string
 					 headline-number ".")))
 	 (todo (and (plist-get info :with-todo-keywords)
 		    (let ((todo (org-element-property :todo-keyword headline)))
@@ -2111,7 +2111,7 @@ org-odt--enumerate
 	  (concat
 	   ;; Section number.
 	   (and scope
-		(mapconcat 'number-to-string
+		(mapconcat #'number-to-string
 			   (org-export-get-headline-number scope info) "."))
 	   ;; Separator.
 	   (and scope ".")
@@ -2524,7 +2524,7 @@ org-odt--render-image/formula
      ((not caption)
       ;; Merge user frame params with that from configuration.
       (setq inner (funcall --merge-frame-params inner user))
-      (apply 'org-odt--frame href width height
+      (apply #'org-odt--frame href width height
 	     (append inner title-and-desc)))
      ;; Case 2: Image/Formula is captioned or labeled.
      ;;         There are two frames: The inner one surrounds the
@@ -2541,11 +2541,11 @@ org-odt--render-image/formula
 			     (when short-caption
 			       (format " draw:name=\"%s\" " short-caption))))
 		    frame-params))
-      (apply 'org-odt--textbox
+      (apply #'org-odt--textbox
 	     (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
 		     "Illustration"
 		     (concat
-		      (apply 'org-odt--frame href width height
+		      (apply #'org-odt--frame href width height
 			     (append inner title-and-desc))
 		      caption))
 	     width height outer)))))
@@ -2708,7 +2708,7 @@ org-odt-link--infer-description
        (when headline
 	 (format "<text:bookmark-ref text:reference-format=\"chapter\" text:ref-name=\"OrgXref.%s\">%s</text:bookmark-ref>"
 		 label
-		 (mapconcat 'number-to-string (org-export-get-headline-number
+		 (mapconcat #'number-to-string (org-export-get-headline-number
 					       headline info) "."))))
      ;; Case 4: Locate a regular headline in the hierarchy.  Display
      ;; its title.
@@ -3164,7 +3164,7 @@ org-odt-hfy-face-to-css
   (let* ((css-list (hfy-face-to-style fn))
 	 (style-name (concat "OrgSrc"
                              (mapconcat
-                              'capitalize (split-string
+                              #'capitalize (split-string
                                            (hfy-face-or-def-to-name fn) "-")
                               "")))
 	 (color-val (cdr (assoc "color" css-list)))
@@ -3699,14 +3699,14 @@ org-odt-table
 
     (concat "\n"
 	    ;; Discontinue the list.
-	    (mapconcat 'car close-open-tags "\n")
+	    (mapconcat #'car close-open-tags "\n")
 	    ;; Put the table in an indented section.
 	    (let* ((table (org-odt--table table contents info))
-		   (level (/ (length (mapcar 'car close-open-tags)) 2))
+		   (level (/ (length (mapcar #'car close-open-tags)) 2))
 		   (style (format "OrgIndentedSection-Level-%d" level)))
 	      (when table (org-odt-format-section table style)))
 	    ;; Continue the list.
-	    (mapconcat 'cdr (nreverse close-open-tags) "\n"))))
+	    (mapconcat #'cdr (nreverse close-open-tags) "\n"))))
 
 
 ;;;; Target
@@ -4013,7 +4013,7 @@ org-odt--translate-description-lists
       (when (eq (org-element-property :type el) 'descriptive)
 	(org-element-set
 	 el
-	 (apply 'org-element-adopt
+	 (apply #'org-element-adopt
 		(list 'plain-list (list :type 'descriptive-1))
 		(mapcar
 		 (lambda (item)
@@ -4024,7 +4024,7 @@ org-odt--translate-description-lists
 			   (or (org-element-property :tag item) "(no term)"))
 		     (org-element-adopt
 		         (list 'plain-list (list :type 'descriptive-2))
-		       (apply 'org-element-adopt
+		       (apply #'org-element-adopt
 			      (list 'item nil)
 			      (org-element-contents item)))))
 		 (org-element-contents el)))))
@@ -4081,7 +4081,7 @@ org-odt--translate-list-tables
 	(org-element-set
 	 l1-list
 	 ;; Build replacement table.
-	 (apply 'org-element-adopt
+	 (apply #'org-element-adopt
 		(list 'table '(:type org :attr_odt (":style \"GriddedTable\"")))
 		(org-element-map l1-list 'item
 		  (lambda (l1-item)
@@ -4099,18 +4099,18 @@ org-odt--translate-list-tables
 			  (setq l2-list (car cur)))
 			(setq l1-item-leading-text l1-item-contents))
 		      ;; Level-1 items start a table row.
-		      (apply 'org-element-adopt
+		      (apply #'org-element-adopt
 			     (list 'table-row (list :type 'standard))
 			     ;;  Leading text of level-1 item define
 			     ;;  the first table-cell.
-			     (apply 'org-element-adopt
+			     (apply #'org-element-adopt
 				    (list 'table-cell nil)
 				    l1-item-leading-text)
 			     ;; Level-2 items define subsequent
 			     ;; table-cells of the row.
 			     (org-element-map l2-list 'item
 			       (lambda (l2-item)
-				 (apply 'org-element-adopt
+				 (apply #'org-element-adopt
 					(list 'table-cell nil)
 					(org-element-contents l2-item)))
 			       info nil 'item))))
@@ -4312,7 +4312,7 @@ org-odt-export-as-odf-and-open
 Use `org-odt-export-as-odf' to read LaTeX fragment and OpenDocument
 formula file."
   (interactive)
-  (org-open-file (call-interactively 'org-odt-export-as-odf) 'system))
+  (org-open-file (call-interactively #'org-odt-export-as-odf) 'system))
 
 
 ;;;; Export to OpenDocument Text
diff --git a/lisp/ox.el b/lisp/ox.el
index 2190c59b2..5b99dc04a 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -7474,7 +7474,7 @@ org-export--dispatch-ui
                          (propertize key
                                      'font-lock-face 'help-key-binding
                                      'face 'help-key-binding))))
-                  (apply 'format
+                  (apply #'format
                          (cons "Use %s, %s, %s, or %s to navigate."
                                (mapcar propertize-help-key
                                        (list "SPC" "DEL" "C-n" "C-p"))))))
diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index a7b1137f4..0f0522aaa 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -1241,7 +1241,7 @@ test-ol-with-link-parameters-as
          ;; Set `parameters' values and execute body.
          (progn (org-link-set-parameters ,type ,@parameters) ,@body)
        ;; Restore original values.
-       (apply 'org-link-set-parameters ,type ',orig-parameters))))
+       (apply #'org-link-set-parameters ,type ',orig-parameters))))
 
 (defun test-ol-insert-link-get-desc (&optional link-location description)
   "Insert link in temp buffer, return description.
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 95a934c6c..d5b5c853e 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -687,13 +687,13 @@ test-org-table/empty-field
    (concat
     "#+TBLFM: "
     "$5 = '(let ((l '($1..$4))) (if (member \"\" l) \"\" "
-    "(/ (apply '+ (mapcar 'string-to-number l)) (length l)))); E :: "
+    "(/ (apply #'+ (mapcar #'string-to-number l)) (length l)))); E :: "
     "$6 = '(let ((l '(@0$1..@0$4))) (if (member \"\" l) \"\" "
-    "(/ (apply '+ (mapcar 'string-to-number l)) (length l)))); E :: "
+    "(/ (apply #'+ (mapcar #'string-to-number l)) (length l)))); E :: "
     "$7 = '(let ((l '($1..$4))) "
-    "(if l (/ (apply '+ l) (length l)) \"\")); N :: "
+    "(if l (/ (apply #'+ l) (length l)) \"\")); N :: "
     "$8 = '(let ((l '(@0$1..@0$4))) "
-    "(if l (/ (apply '+ l) (length l)) \"\")); N :: "
+    "(if l (/ (apply #'+ l) (length l)) \"\")); N :: "
     "$9 = '(/ (+ $1..$4) (length '($1..$4))); EN :: "
     "$10 = '(/ (+ @0$1..@0$4) (length '(@0$1..@0$4))); EN")))
 
@@ -947,7 +947,7 @@ test-org-table/org-lookup-all
     2 (concat
        "#+TBLFM: $2 = '(let ((all (org-lookup-all '$1 "
        "'(remote(data, @I$2..@>$2)) '(remote(data, @I$4..@>$4))))) "
-       "(/ (apply '+ all) (length all) 1.0)); L :: "
+       "(/ (apply #'+ all) (length all) 1.0)); L :: "
        "$3 = '(+ 1 (length (org-lookup-all $2 '(@I$2..@>$2) nil '<))); N"))
 
     ;; Shop rating and ranking by average purchase from "#+NAME: data"
@@ -967,7 +967,7 @@ test-org-table/org-lookup-all
      2 (concat
        "#+TBLFM: $2 = '(let ((all (org-lookup-all '$1 "
        "'(remote(data, @I$3..@>$3)) '(remote(data, @I$4..@>$4))))) "
-       "(/ (apply '+ all) (length all) 1.0)); L :: "
+       "(/ (apply #'+ all) (length all) 1.0)); L :: "
        "$3 = '(+ 1 (length (org-lookup-all $2 '(@I$2..@>$2) nil '<))); N"))))
 
 (ert-deftest test-org-table/org-table-make-reference/mode-string-EL ()
diff --git a/testing/lisp/test-org-tempo.el b/testing/lisp/test-org-tempo.el
index af0cd795e..d0d233c55 100644
--- a/testing/lisp/test-org-tempo.el
+++ b/testing/lisp/test-org-tempo.el
@@ -45,7 +45,7 @@ test-org-tempo/completion
   (should
    (equal (org-test-with-temp-text "<l<point>"
 	    (org-tempo-setup)
-	    (call-interactively 'org-cycle)
+	    (call-interactively #'org-cycle)
 	    (buffer-string))
 	  "#+begin_export latex\n\n#+end_export"))
   ;; Tab should work for expansion.
@@ -62,7 +62,7 @@ test-org-tempo/completion
   (should
    (equal (org-test-with-temp-text "<k"
 	    (org-tempo-setup)
-	    (call-interactively 'org-cycle)
+	    (call-interactively #'org-cycle)
 	    (buffer-string))
 	  "<k")))
 
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index d68119526..5396e2b80 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1693,13 +1693,13 @@ test-org/with-electric-indent
    (equal "  Para\n  graph"
 	  (org-test-with-temp-text "  Para<point>graph"
 	    (electric-indent-local-mode 1)
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	    (buffer-string))))
   (should
    (equal "- item1\n  item2"
 	  (org-test-with-temp-text "- item1<point>item2"
 	    (electric-indent-local-mode 1)
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	    (buffer-string))))
   ;; TODO: test more values of `org-adapt-indentation'.
   (let ((org-adapt-indentation t))
@@ -1707,7 +1707,7 @@ test-org/with-electric-indent
      (equal "* heading\n  body"
 	    (org-test-with-temp-text "* heading<point>body"
 	      (electric-indent-local-mode 1)
-	      (call-interactively 'org-return)
+	      (call-interactively #'org-return)
 	      (buffer-string)))))
   ;; Make sure that we do not mess things up when indenting remotely
   ;; in src block buffer.
@@ -1718,7 +1718,7 @@ test-org/with-electric-indent
      (equal "#+begin_src fundamental\n  \n#+end_src" ; 2 spaces
             (org-test-with-temp-text "#+begin_src fundamental<point>\n#+end_src"
               (electric-indent-local-mode 1)
-              (call-interactively 'org-return)
+              (call-interactively #'org-return)
               (should (looking-at-p "\n\\#"))
               (buffer-string)))))
   ;; C-j, like `electric-newline-and-maybe-indent', should not indent.
@@ -1726,13 +1726,13 @@ test-org/with-electric-indent
    (equal "  Para\ngraph"
 	  (org-test-with-temp-text "  Para<point>graph"
 	    (electric-indent-local-mode 1)
-	    (call-interactively 'org-return-and-maybe-indent)
+	    (call-interactively #'org-return-and-maybe-indent)
 	    (buffer-string))))
   (should
    (equal "- item1\nitem2"
 	  (org-test-with-temp-text "- item1<point>item2"
 	    (electric-indent-local-mode 1)
-	    (call-interactively 'org-return-and-maybe-indent)
+	    (call-interactively #'org-return-and-maybe-indent)
 	    (buffer-string))))
   ;; TODO: test more values of `org-adapt-indentation'.
   (let ((org-adapt-indentation t))
@@ -1740,7 +1740,7 @@ test-org/with-electric-indent
      (equal "* heading\nbody"
 	    (org-test-with-temp-text "* heading<point>body"
 	      (electric-indent-local-mode 1)
-	      (call-interactively 'org-return-and-maybe-indent)
+	      (call-interactively #'org-return-and-maybe-indent)
 	      (buffer-string))))))
 
 (ert-deftest test-org/without-electric-indent ()
@@ -1753,32 +1753,32 @@ test-org/without-electric-indent
    (equal "  Para\ngraph"
 	  (org-test-with-temp-text "  Para<point>graph"
 	    (electric-indent-local-mode 0)
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	    (buffer-string))))
   (should
    (equal "- item1\nitem2"
 	  (org-test-with-temp-text "- item1<point>item2"
 	    (electric-indent-local-mode 0)
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	    (buffer-string))))
   (should
    (equal "* heading\nbody"
 	  (org-test-with-temp-text "* heading<point>body"
 	    (electric-indent-local-mode 0)
-	    (call-interactively 'org-return)
+	    (call-interactively #'org-return)
 	    (buffer-string))))
   ;; C-j, like `electric-newline-and-maybe-indent', should indent.
   (should
    (equal "  Para\n  graph"
 	  (org-test-with-temp-text "  Para<point>graph"
 	    (electric-indent-local-mode 0)
-	    (call-interactively 'org-return-and-maybe-indent)
+	    (call-interactively #'org-return-and-maybe-indent)
 	    (buffer-string))))
   (should
    (equal "- item1\n  item2"
 	  (org-test-with-temp-text "- item1<point>item2"
 	    (electric-indent-local-mode 0)
-	    (call-interactively 'org-return-and-maybe-indent)
+	    (call-interactively #'org-return-and-maybe-indent)
 	    (buffer-string))))
   ;; TODO: test more values of `org-adapt-indentation'.
   (let ((org-adapt-indentation t))
@@ -1786,7 +1786,7 @@ test-org/without-electric-indent
      (equal "* heading\n  body"
 	    (org-test-with-temp-text "* heading<point>body"
 	      (electric-indent-local-mode 0)
-	      (call-interactively 'org-return-and-maybe-indent)
+	      (call-interactively #'org-return-and-maybe-indent)
 	      (buffer-string))))))
 
 (ert-deftest test-org/meta-return ()
@@ -4246,7 +4246,7 @@ test-org/sort-entries
             (org-overview)
             (goto-char 13)
             (let ((unread-command-events (listify-key-sequence (kbd "a"))))
-              (call-interactively 'org-sort-entries))
+              (call-interactively #'org-sort-entries))
 	    (buffer-string))))
 
   ;; Sort region
-- 
2.55.0

>From 0c54d02f565592f83a4bb54beaf7e11f1f4fc3c5 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 14 Oct 2026 11:16:45 -0400
Subject: [PATCH 2/2] Do not quote lambda's

* lisp/ob-C.el (org-babel-C-val-to-C-type):
* lisp/ob-core.el (org-babel-safe-header-args):
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data):
* lisp/ob-sql.el (org-babel-sql-expand-vars):
* lisp/ol-bbdb.el (org-bbdb-anniversary-format-alist):
* lisp/org-agenda.el (org-agenda-set-mode-name):
* lisp/org-lint.el (org-lint--report-mode):
* lisp/org-list.el (org-list-to-generic):
* lisp/org-macro.el (org-macro-initialize-templates):
* lisp/org-plot.el (org-plot/preset-plot-types):
* lisp/org-table.el (orgtbl-to-generic):
* lisp/org.el (org-org-menu, org-tbl-menu):
* lisp/ox-ascii.el (ascii):
* lisp/ox-html.el (html):
* lisp/ox-koma-letter.el (koma-letter):
* lisp/ox-latex.el (org-latex--section-backend):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt, org-odt-footnote-reference):
* lisp/ox-org.el (org):
* lisp/ox-texinfo.el (texinfo):
* testing/lisp/test-oc.el (test-org-cite--export-with-rule)
(test-org-cite/export-capability):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary)
(test-org-colview/columns-custom-summary-hierarchical):
* testing/lisp/test-ox-publish.el
(test-org-publish/resolve-external-link):
* testing/lisp/test-ox.el (test-org-export/bind-keyword)
(test-org-export/set-title):
Do not quote these so they can be evaluated by the compiler.

Silence compiler warnings by renaming unused arguments to start with a
"_" and by adding some 'declare-function' calls.
---
 lisp/ob-C.el                     | 10 ++--
 lisp/ob-core.el                  |  4 +-
 lisp/ob-gnuplot.el               |  7 +--
 lisp/ob-sql.el                   | 13 +++--
 lisp/ol-bbdb.el                  | 18 +++----
 lisp/org-agenda.el               |  4 +-
 lisp/org-lint.el                 |  6 +--
 lisp/org-list.el                 |  2 +-
 lisp/org-macro.el                | 16 +++---
 lisp/org-plot.el                 | 93 ++++++++++++++++----------------
 lisp/org-table.el                |  5 +-
 lisp/org.el                      |  8 +--
 lisp/ox-ascii.el                 | 26 ++++-----
 lisp/ox-html.el                  |  8 +--
 lisp/ox-koma-letter.el           |  8 +--
 lisp/ox-latex.el                 |  6 +--
 lisp/ox-man.el                   |  8 +--
 lisp/ox-md.el                    | 12 ++---
 lisp/ox-odt.el                   | 20 +++----
 lisp/ox-org.el                   |  8 +--
 lisp/ox-texinfo.el               |  8 +--
 testing/lisp/test-oc.el          | 70 ++++++++++++------------
 testing/lisp/test-org-colview.el |  6 +--
 testing/lisp/test-ox-publish.el  |  6 +--
 testing/lisp/test-ox.el          | 10 ++--
 25 files changed, 193 insertions(+), 189 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 9ebd09754..787b0d31a 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -358,7 +358,8 @@ org-babel-C-val-to-C-type
      ((integerp val) type) ;; an integer declared in the #+begin_src line
      ((floatp val) type) ;; a numeric declared in the #+begin_src line
      ((and (listp val) (listp (car val))) ;; a table
-      `(,(car type)
+      (list
+        (car type)
 	(lambda (val)
 	  (cons
            (pcase org-babel-c-variant
@@ -370,19 +371,20 @@ org-babel-C-val-to-C-type
 	     (lambda (v)
 	       (concat
 		(if (eq org-babel-c-variant 'd) " [" " {")
-		(mapconcat (lambda (w) (format ,(cadr type) w)) v ",")
+		(mapconcat (lambda (w) (format (cadr type) w)) v ",")
 		(if (eq org-babel-c-variant 'd) "]" "}")))
 	     val
 	     ",\n")
 	    (if (eq org-babel-c-variant 'd) "\n]" "\n}"))))))
      ((or (listp val) (vectorp val)) ;; a list declared in the #+begin_src line
-      `(,(car type)
+      (list
+       (car type)
 	(lambda (val)
 	  (cons
 	   (format "[%d]" (length val))
 	   (concat
 	    (if (eq org-babel-c-variant 'd) "[" "{")
-	    (mapconcat (lambda (v) (format ,(cadr type) v)) val ",")
+	    (mapconcat (lambda (v) (format (cadr type) v)) val ",")
 	    (if (eq org-babel-c-variant 'd) "]" "}"))))))
      (t ;; treat unknown types as string
       type))))
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c5a54190..074bf1583 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -509,11 +509,11 @@ org-babel-header-arg-names
 specific header arguments as well.")
 
 (defconst org-babel-safe-header-args
-  '(:cache :colnames :comments :exports :epilogue :hlines :noeval
+  `(:cache :colnames :comments :exports :epilogue :hlines :noeval
 	   :noweb :noweb-ref :noweb-sep :noweb-prefix :padline
            :prologue :rownames :sep :session :tangle :wrap
 	   (:eval . ("never" "query"))
-	   (:results . (lambda (str) (not (string-match "file" str)))))
+	   (:results . ,(lambda (str) (not (string-match "file" str)))))
   "A list of safe header arguments for babel source blocks.
 
 The list can have entries of the following forms:
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index ab4fe537a..88e6bf3a9 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -48,6 +48,7 @@
 
 (declare-function org-time-string-to-time "org" (s))
 (declare-function orgtbl-to-generic "org-table" (table params))
+(declare-function org-element-interpret-data "org-element" (data))
 (declare-function gnuplot-mode "ext:gnuplot-mode" ())
 (declare-function gnuplot-send-string-to-gnuplot "ext:gnuplot-mode" (str txt))
 (declare-function gnuplot-send-buffer-to-gnuplot "ext:gnuplot-mode" ())
@@ -304,13 +305,13 @@ org-babel-gnuplot-table-to-data
                     :parent 'ascii
                     :transcoders
                     `(;; Do not try to resolve links.  Export them verbatim.
-                      (link . (lambda (link _ _) (org-element-interpret-data link)))
+                      (link . ,(lambda (link _ _) (org-element-interpret-data link)))
                       ;; Drop emphasis markers from verbatim and code.
                       ;; This way, data can use verbatim when escaping
                       ;; is necessary and yet be readable by Gnuplot,
                       ;; which is not aware about Org's markup.
-                      (verbatim . (lambda (verbatim _ _) (org-element-property :value verbatim)))
-                      (code . (lambda (code _ _) (org-element-property :value code)))))))
+                      (verbatim . ,(lambda (verbatim _ _) (org-element-property :value verbatim)))
+                      (code . ,(lambda (code _ _) (org-element-property :value code)))))))
 	      (orgtbl-to-generic
 	       table
 	       (org-combine-plists
diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index bd9f194e1..dbbc4c992 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -414,13 +414,12 @@ org-babel-sql-expand-vars
                   (let ((data-file (org-babel-temp-file "sql-data-")))
                     (with-temp-file data-file
                       (insert (orgtbl-to-csv
-                               val (if sqlite
-                                       nil
-                                     '( :fmt (lambda (el)
-                                               (if (stringp el)
-                                                   el
-                                                 (format "%S" el)))
-                                        :with-special-rows nil)))))
+                               val (unless sqlite
+                                     (list :fmt (lambda (el)
+                                                  (if (stringp el)
+                                                      el
+                                                    (format "%S" el)))
+                                           :with-special-rows nil)))))
                     data-file)
                 (if (stringp val) val (format "%S" val))))
 	    body t t)))
diff --git a/lisp/ol-bbdb.el b/lisp/ol-bbdb.el
index 3e2a2da4b..4af60c93a 100644
--- a/lisp/ol-bbdb.el
+++ b/lisp/ol-bbdb.el
@@ -159,16 +159,16 @@ org-bbdb-general-anniversary-description-after
   :safe #'integerp)
 
 (defcustom org-bbdb-anniversary-format-alist
-  '(("birthday" .
-     (lambda (name years suffix)
-       (concat "Birthday: [[bbdb:" name "][" name " ("
-	       (format "%s" years)        ; handles numbers as well as strings
-	       suffix ")]]")))
+  `(("birthday" .
+     ,(lambda (name years suffix)
+        (concat "Birthday: [[bbdb:" name "][" name " ("
+	        (format "%s" years)        ; handles numbers as well as strings
+	        suffix ")]]")))
     ("wedding" .
-     (lambda (name years suffix)
-       (concat "[[bbdb:" name "][" name "'s "
-	       (format "%s" years)
-	       suffix " wedding anniversary]]"))))
+     ,(lambda (name years suffix)
+        (concat "[[bbdb:" name "][" name "'s "
+	        (format "%s" years)
+	        suffix " wedding anniversary]]"))))
   "How different types of anniversaries should be formatted.
 An alist of elements (STRING . FORMAT) where STRING is the name of an
 anniversary class and format is either:
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 325646b59..f525fb019 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9193,9 +9193,9 @@ org-agenda-set-mode-name
 		"")
 	      (if (or org-agenda-regexp-filter
 		      (assoc-default 'regexp org-agenda-filters-preset))
-		  '(:eval (propertize
+		  `(:eval (propertize
 			   (concat (mapconcat
-				    (lambda (x) (concat (substring x 0 1) "/" (substring x 1) "/"))
+				    ,(lambda (x) (concat (substring x 0 1) "/" (substring x 1) "/"))
 				    (append
 				     (assoc-default 'regexp org-agenda-filters-preset)
 				     org-agenda-regexp-filter)
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index b97c92212..67c4d2878 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -188,9 +188,9 @@ org-lint--report-mode
 \\{org-lint--report-mode-map}"
   (setf tabulated-list-format
 	`[("Line" 6
-	   (lambda (a b)
-	     (< (string-to-number (aref (cadr a) 0))
-		(string-to-number (aref (cadr b) 0))))
+	   ,(lambda (a b)
+	      (< (string-to-number (aref (cadr a) 0))
+		 (string-to-number (aref (cadr b) 0))))
 	   :right-align t)
 	  ("Trust" 5 t)
 	  ("Warning" 0 t)])
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 8605c6f08..50cadc4ed 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -3443,7 +3443,7 @@ org-list-to-generic
 	   :transcoders
 	   `((plain-list . ,(org-list--to-generic-plain-list params))
 	     (item . ,(org-list--to-generic-item params))
-	     (macro . (lambda (m c i) (org-element-macro-interpreter m nil))))))
+	     (macro . ,(lambda (m _c _i) (org-element-macro-interpreter m nil))))))
 	 data info)
     ;; Write LIST back into Org syntax and parse it.
     (with-temp-buffer
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 1fb48ffcf..b5650ddf0 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -186,14 +186,14 @@ org-macro-initialize-templates
                                   (org-macro--vc-modified-time visited-file))
                              modtime))))))))
 	 ;; Install generic macros.
-	 '(("keyword" . (lambda (arg1 &rest _)
-                          (org-macro--find-keyword-value arg1 t)))
-	   ("n" . (lambda (&optional arg1 arg2 &rest _)
-                    (org-macro--counter-increment arg1 arg2)))
-           ("property" . (lambda (arg1 &optional arg2 &rest _)
-                           (org-macro--get-property arg1 arg2)))
-	   ("time" . (lambda (arg1 &rest _)
-                       (format-time-string arg1)))))))
+         `(("keyword" . ,(lambda (arg1 &rest _)
+                           (org-macro--find-keyword-value arg1 t)))
+           ("n" . ,(lambda (&optional arg1 arg2 &rest _)
+                     (org-macro--counter-increment arg1 arg2)))
+           ("property" . ,(lambda (arg1 &optional arg2 &rest _)
+                            (org-macro--get-property arg1 arg2)))
+           ("time" . ,(lambda (arg1 &rest _)
+                        (format-time-string arg1)))))))
 
 (defun org-macro-expand (macro templates)
   "Return expanded MACRO, as a string.
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 66b924944..417a2eec5 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -305,59 +305,60 @@ org-plot/gnuplot-script-preamble
   :type '(choice string function))
 
 (defcustom org-plot/preset-plot-types
-  '((2d :plot-cmd "plot"
+  `((2d :plot-cmd "plot"
 	:check-ind-type t
 	:plot-func
-	(lambda (_table data-file num-cols params plot-str)
-	  (let* ((type (plist-get params :plot-type))
-		 (with (if (eq type 'grid) 'pm3d (plist-get params :with)))
-		 (ind (plist-get params :ind))
-		 (deps (if (plist-member params :deps) (plist-get params :deps)))
-		 (text-ind (or (plist-get params :textind)
-                               (eq (plist-get params :with) 'histograms)))
-		 (col-labels (plist-get params :labels))
-		 res)
-	    (dotimes (col num-cols res)
-	      (unless (and (eq type '2d)
-			   (or (and ind (equal (1+ col) ind))
-			       (and deps (not (member (1+ col) deps)))))
-		(setf res
-		      (cons
-		       (format plot-str data-file
-			       (or (and ind (> ind 0)
-					(not text-ind)
-					(format "%d:" ind)) "")
-			       (1+ col)
-			       (if text-ind (format ":xticlabel(%d)" ind) "")
-			       with
-			       (or (nth col col-labels)
-				   (format "%d" (1+ col))))
-		       res)))))))
+	,(lambda (_table data-file num-cols params plot-str)
+	   (let* ((type (plist-get params :plot-type))
+		  (with (if (eq type 'grid) 'pm3d (plist-get params :with)))
+		  (ind (plist-get params :ind))
+		  (deps (if (plist-member params :deps) (plist-get params :deps)))
+		  (text-ind (or (plist-get params :textind)
+                                (eq (plist-get params :with) 'histograms)))
+		  (col-labels (plist-get params :labels))
+		  res)
+	     (dotimes (col num-cols)
+	       (unless (and (eq type '2d)
+			    (or (and ind (equal (1+ col) ind))
+			        (and deps (not (member (1+ col) deps)))))
+		 (setf res
+		       (cons
+		        (format plot-str data-file
+			        (or (and ind (> ind 0)
+					 (not text-ind)
+					 (format "%d:" ind)) "")
+			        (1+ col)
+			        (if text-ind (format ":xticlabel(%d)" ind) "")
+			        with
+			        (or (nth col col-labels)
+				    (format "%d" (1+ col))))
+		        res))))
+             res)))
     (3d :plot-cmd "splot"
-	:plot-pre (lambda (_table _data-file _num-cols params _plot-str)
-		    (if (plist-get params :map) "set map"))
+	:plot-pre ,(lambda (_table _data-file _num-cols params _plot-str)
+		     (if (plist-get params :map) "set map"))
 	:plot-func
-	(lambda (_table data-file _num-cols params _plot-str)
-	  (let* ((type (plist-get params :plot-type))
-		 (with (if (eq type 'grid) 'pm3d (plist-get params :with))))
-	    (list (format "'%s' matrix with %s title ''"
-			  data-file with)))))
+	,(lambda (_table data-file _num-cols params _plot-str)
+	   (let* ((type (plist-get params :plot-type))
+		  (with (if (eq type 'grid) 'pm3d (plist-get params :with))))
+	     (list (format "'%s' matrix with %s title ''"
+			   data-file with)))))
     (grid :plot-cmd "splot"
-	  :plot-pre (lambda (_table _data-file _num-cols params _plot-str)
-		      (if (plist-get params :map) "set pm3d map" "set map"))
-	  :data-dump (lambda (table data-file _num-cols params)
-		       (let ((y-labels (org-plot/gnuplot-to-grid-data
-					table data-file params)))
-			 (when y-labels (plist-put params :ylabels y-labels))))
+	  :plot-pre ,(lambda (_table _data-file _num-cols params _plot-str)
+		       (if (plist-get params :map) "set pm3d map" "set map"))
+	  :data-dump ,(lambda (table data-file _num-cols params)
+		        (let ((y-labels (org-plot/gnuplot-to-grid-data
+					 table data-file params)))
+			  (when y-labels (plist-put params :ylabels y-labels))))
 	  :plot-func
-	  (lambda (table data-file _num-cols params _plot-str)
-	    (let* ((type (plist-get params :plot-type))
-		   (with (if (eq type 'grid) 'pm3d (plist-get params :with))))
-	      (list (format "'%s' with %s title ''"
-			    data-file with)))))
+	  ,(lambda (_table data-file _num-cols params _plot-str)
+	     (let* ((type (plist-get params :plot-type))
+		    (with (if (eq type 'grid) 'pm3d (plist-get params :with))))
+	       (list (format "'%s' with %s title ''"
+			     data-file with)))))
     (radar :plot-func
-	   (lambda (table _data-file _num-cols params plot-str)
-	     (list (org--plot/radar table params)))))
+	   ,(lambda (table _data-file _num-cols params _plot-str)
+	      (list (org--plot/radar table params)))))
   "List of plists describing the available plot types.
 The car is the type name, and the property :plot-func must be
 set.  The value of :plot-func is a lambda which yields plot-lines
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 69d2eb317..c36fce71a 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -53,6 +53,7 @@
 (declare-function org-element-extract "org-element-ast" (node))
 (declare-function org-element-interpret-data "org-element" (data))
 (declare-function org-element-lineage "org-element-ast" (blob &optional types with-self))
+(declare-function org-element-macro-interpreter "org-element" (macro ##))
 (declare-function org-element-map "org-element" (data types fun &optional info first-match no-recursion with-affiliated no-undefer))
 (declare-function org-element-property "org-element-ast" (property node))
 (declare-function org-element-end "org-element" (node))
@@ -5838,13 +5839,13 @@ orgtbl-to-generic
 	     ;; regular backend has a transcoder for them.  We
 	     ;; provide one so they are not ignored, but displayed
 	     ;; as-is instead.
-	     (macro . (lambda (m c i) (org-element-macro-interpreter m nil)))
+	     (macro . ,(lambda (m _c _i) (org-element-macro-interpreter m nil)))
              ;; Only export the actual table.  Do nothing with the
              ;; containing section regardless what backend think about
              ;; it.  (It is somewhat like BODY-ONLY argument in
              ;; `org-export-as', but skips not only transcoding the
              ;; full document, but also section containing the table.
-             (section . (lambda (_ contents _) contents))))))
+             (section . ,(lambda (_ contents _) contents))))))
     ;; Store TABLE as Org syntax in DATA.  Tolerate non-string cells.
     ;; Initialize communication channel in INFO.
     (with-temp-buffer
diff --git a/lisp/org.el b/lisp/org.el
index ed1077ff1..95295ba7b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18331,12 +18331,12 @@ org-org-menu
      ["Insert Timer Item" org-timer-item t])
     ("Logging work"
      ["Clock In" org-clock-in :active t :keys "C-c C-x C-i"]
-     ["Switch Task" (lambda () (interactive) (org-clock-in '(4))) :active t :keys "C-u C-c C-x C-i"]
+     ["Switch Task" ,(lambda () (interactive) (org-clock-in '(4))) :active t :keys "C-u C-c C-x C-i"]
      ["Clock Out" org-clock-out t]
      ["Clock Cancel" org-clock-cancel t]
      "--"
      ["Mark as Default Task" org-clock-mark-default-task t]
-     ["Clock In, Mark as Default" (lambda () (interactive) (org-clock-in '(16))) :active t :keys "C-u C-u C-c C-x C-i"]
+     ["Clock In, Mark as Default" ,(lambda () (interactive) (org-clock-in '(16))) :active t :keys "C-u C-u C-c C-x C-i"]
      ["Go to Running Clock" org-clock-goto t]
      "--"
      ["Display Times" org-clock-display t]
@@ -18420,8 +18420,8 @@ org-tbl-menu
      ["Edit Formulas" org-edit-special (org-at-table-p)]
      "--"
      ["Recalculate Line" org-table-recalculate (org-at-table-p)]
-     ["Recalculate All" (lambda () (interactive) (org-table-recalculate '(4))) :active (org-at-table-p) :keys "C-u C-c *"]
-     ["Iterate All" (lambda () (interactive) (org-table-recalculate '(16))) :active (org-at-table-p) :keys "C-u C-u C-c *"]
+     ["Recalculate All" ,(lambda () (interactive) (org-table-recalculate '(4))) :active (org-at-table-p) :keys "C-u C-c *"]
+     ["Iterate All" ,(lambda () (interactive) (org-table-recalculate '(16))) :active (org-at-table-p) :keys "C-u C-u C-c *"]
      "--"
      ["Toggle Recalculate Mark" org-table-rotate-recalc-marks (org-at-table-p)]
      "--"
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 6f59f30f0..d7431ae34 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -99,25 +99,25 @@ 'ascii
     (verbatim . org-ascii-verbatim)
     (verse-block . org-ascii-verse-block))
   :menu-entry
-  '(?t "Export to Plain Text"
+  `(?t "Export to Plain Text"
        ((?A "As ASCII buffer"
-	    (lambda (a s v b)
-	      (org-ascii-export-as-ascii a s v b '(:ascii-charset ascii))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-as-ascii a s v b '(:ascii-charset ascii))))
 	(?a "As ASCII file"
-	    (lambda (a s v b)
-	      (org-ascii-export-to-ascii a s v b '(:ascii-charset ascii))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-to-ascii a s v b '(:ascii-charset ascii))))
 	(?L "As Latin1 buffer"
-	    (lambda (a s v b)
-	      (org-ascii-export-as-ascii a s v b '(:ascii-charset latin1))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-as-ascii a s v b '(:ascii-charset latin1))))
 	(?l "As Latin1 file"
-	    (lambda (a s v b)
-	      (org-ascii-export-to-ascii a s v b '(:ascii-charset latin1))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-to-ascii a s v b '(:ascii-charset latin1))))
 	(?U "As UTF-8 buffer"
-	    (lambda (a s v b)
-	      (org-ascii-export-as-ascii a s v b '(:ascii-charset utf-8))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-as-ascii a s v b '(:ascii-charset utf-8))))
 	(?u "As UTF-8 file"
-	    (lambda (a s v b)
-	      (org-ascii-export-to-ascii a s v b '(:ascii-charset utf-8))))))
+	    ,(lambda (a s v b)
+	       (org-ascii-export-to-ascii a s v b '(:ascii-charset utf-8))))))
   :filters-alist '((:filter-headline . org-ascii-filter-headline-blank-lines)
 		   (:filter-parse-tree org-ascii-filter-paragraph-spacing
 				       org-ascii-filter-comment-spacing)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index f436606f9..5c9cebe07 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -108,13 +108,13 @@ 'html
                                        org-html-prepare-latex-images)
 		   (:filter-final-output . org-html-final-function))
   :menu-entry
-  '(?h "Export to HTML"
+  `(?h "Export to HTML"
        ((?H "As HTML buffer" org-html-export-as-html)
 	(?h "As HTML file" org-html-export-to-html)
 	(?o "As HTML file and open"
-	    (lambda (a s v b)
-	      (if a (org-html-export-to-html t s v b)
-		(org-open-file (org-html-export-to-html nil s v b)))))))
+	    ,(lambda (a s v b)
+	       (if a (org-html-export-to-html t s v b)
+		 (org-open-file (org-html-export-to-html nil s v b)))))))
   :options-alist
   '((:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
     (:html-container "HTML_CONTAINER" nil org-html-container-element)
diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el
index 1e707c4a1..e8cb9a9b8 100644
--- a/lisp/ox-koma-letter.el
+++ b/lisp/ox-koma-letter.el
@@ -527,14 +527,14 @@ 'koma-letter
                      (keyword . org-koma-letter-keyword)
                      (template . org-koma-letter-template))
   :menu-entry
-  '(?k "Export with KOMA Scrlttr2"
+  `(?k "Export with KOMA Scrlttr2"
        ((?L "As LaTeX buffer" org-koma-letter-export-as-latex)
         (?l "As LaTeX file" org-koma-letter-export-to-latex)
         (?p "As PDF file" org-koma-letter-export-to-pdf)
         (?o "As PDF file and open"
-            (lambda (a s v b)
-              (if a (org-koma-letter-export-to-pdf t s v b)
-                (org-open-file (org-koma-letter-export-to-pdf nil s v b))))))))
+            ,(lambda (a s v b)
+               (if a (org-koma-letter-export-to-pdf t s v b)
+                 (org-open-file (org-koma-letter-export-to-pdf nil s v b))))))))
 
 
 
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 0197296f0..be81a43db 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2773,13 +2773,13 @@ org-latex--section-backend
   (org-export-create-backend
    :parent 'latex
    :transcoders
-   '((underline . (lambda (o c i) (format "\\underline{%s}" c)))
+   `((underline . ,(lambda (_ c _) (format "\\underline{%s}" c)))
      ;; LaTeX isn't happy when you try to use \verb inside the argument of other
      ;; commands (like \section, etc.), and this causes compilation to fail.
      ;; So, within headings it's a good idea to replace any instances of \verb
      ;; with \texttt.
-     (code . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))
-     (verbatim . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))))
+     (code . ,(lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))
+     (verbatim . ,(lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))))
   "Export backend that hard-codes \\underline within \\section and alike.")
 
 (defconst org-latex--section-no-footnote-backend
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index f8c559e1a..566f4b1a0 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -107,13 +107,13 @@ 'man
     (verse-block . org-man-verse-block))
   :filters-alist '((:filter-parse-tree . org-man--remove-blank))
   :menu-entry
-  '(?M "Export to MAN"
+  `(?M "Export to MAN"
        ((?m "As MAN file" org-man-export-to-man)
 	(?p "As PDF file" org-man-export-to-pdf)
 	(?o "As PDF file and open"
-	    (lambda (a s v b)
-	      (if a (org-man-export-to-pdf t s v b)
-		(org-open-file (org-man-export-to-pdf nil s v b)))))))
+	    ,(lambda (a s v b)
+	       (if a (org-man-export-to-pdf t s v b)
+		 (org-open-file (org-man-export-to-pdf nil s v b)))))))
   :options-alist
   '((:man-class "MAN_CLASS" nil nil t)
     (:man-class-options "MAN_CLASS_OPTIONS" nil nil t)
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 3079a26d0..9a2268f9a 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -116,14 +116,14 @@ org-md-link-org-files-as-md
 (org-export-define-derived-backend 'md 'html
   :filters-alist '((:filter-parse-tree . org-md-separate-elements))
   :menu-entry
-  '(?m "Export to Markdown"
+  `(?m "Export to Markdown"
        ((?M "To temporary buffer"
-	    (lambda (a s v b) (org-md-export-as-markdown a s v)))
-	(?m "To file" (lambda (a s v b) (org-md-export-to-markdown a s v)))
+	    ,(lambda (a s v _b) (org-md-export-as-markdown a s v)))
+	(?m "To file" ,(lambda (a s v _b) (org-md-export-to-markdown a s v)))
 	(?o "To file and open"
-	    (lambda (a s v b)
-	      (if a (org-md-export-to-markdown t s v)
-		(org-open-file (org-md-export-to-markdown nil s v)))))))
+	    ,(lambda (a s v _b)
+	       (if a (org-md-export-to-markdown t s v)
+		 (org-open-file (org-md-export-to-markdown nil s v)))))))
   :translate-alist '((bold . org-md-bold)
 		     (center-block . org-md--convert-to-html)
 		     (code . org-md-verbatim)
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index c70b61bff..079b19bd3 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -96,12 +96,12 @@ 'odt
 		       org-odt--translate-image-links))
                    (:filter-final-output . org-odt--remove-forbidden))
   :menu-entry
-  '(?o "Export to ODT"
+  `(?o "Export to ODT"
        ((?o "As ODT file" org-odt-export-to-odt)
 	(?O "As ODT file and open"
-	    (lambda (a s v b)
-	      (if a (org-odt-export-to-odt t s v)
-		(org-open-file (org-odt-export-to-odt nil s v) 'system))))))
+	    ,(lambda (a s v _b)
+	       (if a (org-odt-export-to-odt t s v)
+		 (org-open-file (org-odt-export-to-odt nil s v) 'system))))))
   :options-alist
   '((:odt-styles-file "ODT_STYLES_FILE" nil org-odt-styles-file t)
     (:description "DESCRIPTION" nil nil newline)
@@ -1761,12 +1761,12 @@ org-odt-footnote-reference
 			      (org-export-create-backend
 			       :parent 'odt
 			       :transcoders
-			       '((paragraph . (lambda (p c i)
-						(org-odt--format-paragraph
-						 p c i
-						 "Footnote"
-						 "OrgFootnoteCenter"
-						 "OrgFootnoteQuotations")))))
+                               `((paragraph . ,(lambda (p c i)
+                                                 (org-odt--format-paragraph
+                                                  p c i
+                                                  "Footnote"
+                                                  "OrgFootnoteCenter"
+                                                  "OrgFootnoteQuotations")))))
 			      info))))
 		   ;; Inline definitions are secondary strings.  We
 		   ;; need to wrap them within a paragraph.
diff --git a/lisp/ox-org.el b/lisp/ox-org.el
index 02dcada91..e0d09d000 100644
--- a/lisp/ox-org.el
+++ b/lisp/ox-org.el
@@ -121,13 +121,13 @@ 'org
     (verbatim . org-org-identity)
     (verse-block . org-org-identity))
   :menu-entry
-  '(?O "Export to Org"
+  `(?O "Export to Org"
        ((?O "As Org buffer" org-org-export-as-org)
 	(?o "As Org file" org-org-export-to-org)
 	(?v "As Org file and open"
-	    (lambda (a s v b)
-	      (if a (org-org-export-to-org t s v b)
-		(org-open-file (org-org-export-to-org nil s v b)))))))
+	    ,(lambda (a s v b)
+	       (if a (org-org-export-to-org t s v b)
+		 (org-open-file (org-org-export-to-org nil s v b)))))))
   :filters-alist '((:filter-parse-tree . org-org--add-missing-sections))
   :options-alist
   ;; Export special table rows.
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 1b4cfc280..81cbccdb5 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -95,13 +95,13 @@ 'texinfo
     (:filter-section . org-texinfo--filter-section-blank-lines)
     (:filter-final-output . org-texinfo--untabify))
   :menu-entry
-  '(?i "Export to Texinfo"
+  `(?i "Export to Texinfo"
        ((?t "As TEXI file" org-texinfo-export-to-texinfo)
 	(?i "As INFO file" org-texinfo-export-to-info)
 	(?o "As INFO file and open"
-	    (lambda (a s v b)
-	      (if a (org-texinfo-export-to-info t s v b)
-		(org-open-file (org-texinfo-export-to-info nil s v b)))))))
+	    ,(lambda (a s v b)
+	       (if a (org-texinfo-export-to-info t s v b)
+		 (org-open-file (org-texinfo-export-to-info nil s v b)))))))
   :options-alist
   '((:texinfo-filename "TEXINFO_FILENAME" nil nil t)
     (:texinfo-class "TEXINFO_CLASS" nil org-texinfo-default-class t)
diff --git a/testing/lisp/test-oc.el b/testing/lisp/test-oc.el
index 9efc0ccd8..3d31ed28d 100644
--- a/testing/lisp/test-oc.el
+++ b/testing/lisp/test-oc.el
@@ -1044,8 +1044,8 @@ test-org-cite--export-with-rule
          (org-export-as
 	  (org-export-create-backend
 	   :transcoders
-	   '((section . (lambda (_s c _i) (replace-regexp-in-string " @" "@" c)))
-             (paragraph . (lambda (_s c _i) c))))))))))
+	   `((section . ,(lambda (_s c _i) (replace-regexp-in-string " @" "@" c)))
+             (paragraph . ,(lambda (_s c _i) c))))))))))
 
 (ert-deftest test-org-cite/adjust-note ()
   "Test `org-cite-adjust-note' function."
@@ -1433,8 +1433,8 @@ test-org-cite/export-capability
                 :export-citation (lambda (&rest _) "citation"))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Export citation as parsed object.
   (should
    (equal "success\n"
@@ -1446,9 +1446,9 @@ test-org-cite/export-capability
                                    (org-element-create 'bold nil "cite")))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c))
-                                (bold . (lambda (&rest _) "success")))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c))
+                                (bold . ,(lambda (&rest _) "success")))))))))
   ;; Export citation as a secondary string.
   (should
    (equal "boldtwo\n"
@@ -1461,9 +1461,9 @@ test-org-cite/export-capability
                                          "two")))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c))
-                                (bold . (lambda (&rest _) "bold")))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c))
+                                (bold . ,(lambda (&rest _) "bold")))))))))
   ;; When exporting citation as a secondary string, last object
   ;; inherits post-blank from initial citation.
   (should
@@ -1477,9 +1477,9 @@ test-org-cite/export-capability
                                          (org-element-create 'bold nil "one"))))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c))
-                                (bold . (lambda (&rest _) "bold")))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c))
+                                (bold . ,(lambda (&rest _) "bold")))))))))
   (should
    (equal "boldtwo one-space\n"
           (org-test-with-temp-text "[cite:@key] one-space"
@@ -1491,9 +1491,9 @@ test-org-cite/export-capability
                                          "two")))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c))
-                                (bold . (lambda (&rest _) "bold")))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c))
+                                (bold . ,(lambda (&rest _) "bold")))))))))
   ;; Make sure to have a space between a quote and a citation.
   (should
    (equal "\"quotation\" citation\n"
@@ -1504,8 +1504,8 @@ test-org-cite/export-capability
                 :export-citation (lambda (&rest _) "citation"))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   (should
    (equal "\"quotation\"  citation\n"
           (org-test-with-temp-text "\"quotation\"  [cite:@key]"
@@ -1515,8 +1515,8 @@ test-org-cite/export-capability
                 :export-citation (lambda (&rest _) "citation"))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Regular bibliography export.
   (should
    (eq 'success
@@ -1537,8 +1537,8 @@ test-org-cite/export-capability
                 :export-citation #'ignore)
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Export bibliography as string.
   (should
    (equal "bibliography\n"
@@ -1550,8 +1550,8 @@ test-org-cite/export-capability
                 :export-citation #'ignore)
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Export bibliography as a parsed element.
   (should
    (equal "success\n"
@@ -1566,8 +1566,8 @@ test-org-cite/export-capability
               (org-export-as
                (org-export-create-backend
                 :transcoders
-                '((section . (lambda (_ c _) c))
-                  (example-block . (lambda (&rest _) "success")))))))))
+                `((section . ,(lambda (_ c _) c))
+                  (example-block . ,(lambda (&rest _) "success")))))))))
   ;; Export bibliography as a list of parsed elements.
   (should
    (equal "success\nsuccess\n"
@@ -1583,8 +1583,8 @@ test-org-cite/export-capability
               (org-export-as
                (org-export-create-backend
                 :transcoders
-                '((section . (lambda (_ c _) c))
-                  (example-block . (lambda (&rest _) "success")))))))))
+                `((section . ,(lambda (_ c _) c))
+                  (example-block . ,(lambda (&rest _) "success")))))))))
   ;; When exporting bibliography as a list of parsed elements, the
   ;; last element inherits post-blank from initial keyword.
   (should
@@ -1601,9 +1601,9 @@ test-org-cite/export-capability
               (org-export-as
                (org-export-create-backend
                 :transcoders
-                '((section . (lambda (_ c _) c))
-                  (example-block . (lambda (&rest _) "success"))
-                  (paragraph . (lambda (_ c _) c)))))))))
+                `((section . ,(lambda (_ c _) c))
+                  (example-block . ,(lambda (&rest _) "success"))
+                  (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Use more appropriate citation processor.
   (should
    (equal
@@ -1667,16 +1667,16 @@ test-org-cite/export-capability
             (let ((org-cite-export-processors nil))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   (should
    (equal "Text.\n"
           (org-test-with-temp-text "Text [cite:@key]."
             (let ((org-cite-export-processors nil))
               (org-export-as (org-export-create-backend
                               :transcoders
-                              '((section . (lambda (_ c _) c))
-                                (paragraph . (lambda (_ c _) c)))))))))
+                              `((section . ,(lambda (_ c _) c))
+                                (paragraph . ,(lambda (_ c _) c)))))))))
   ;; Throw an error if selected processor does not handle "export"
   ;; capability.
   (should-error
diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el
index ffd0d5cf9..8aa3e8c85 100644
--- a/testing/lisp/test-org-colview.el
+++ b/testing/lisp/test-org-colview.el
@@ -1010,7 +1010,7 @@ test-org-colview/columns-summary
 :A: 2
 :END:"
       (let ((org-columns-summary-types
-	     '(("custom" . (lambda (s _) (mapconcat #'identity s "|")))))
+	     `(("custom" . ,(lambda (s _) (mapconcat #'identity s "|")))))
 	    (org-columns-default-format "%A{custom}")) (org-columns))
       (get-char-property (point) 'org-columns-value-modified))))
   ;; Allow custom _collect_ for summary types.
@@ -1154,8 +1154,8 @@ test-org-colview/columns-custom-summary-hierarchical
 :A: 4
 :END:"
       (let ((org-columns-summary-types
-	     '(("join" . (lambda (values _)
-			     (mapconcat #'identity values "|")))))
+             `(("join" . ,(lambda (values _)
+                            (mapconcat #'identity values "|")))))
 	    (org-columns-default-format "%A{join}"))
 	(org-columns))
       (let (results)
diff --git a/testing/lisp/test-ox-publish.el b/testing/lisp/test-ox-publish.el
index b6e7bfef2..f9988e679 100644
--- a/testing/lisp/test-ox-publish.el
+++ b/testing/lisp/test-ox-publish.el
@@ -569,9 +569,9 @@ test-org-publish/resolve-external-link
 		"")))
 	   (backend
 	    (org-export-create-backend
-	     :transcoders `((headline . (lambda (h c i) c))
-			    (paragraph . (lambda (p c i) c))
-			    (section . (lambda (s c i) c))
+	     :transcoders `((headline . ,(lambda (_h c _i) c))
+			    (paragraph . ,(lambda (_p c _i) c))
+			    (section . ,(lambda (_s c _i) c))
 			    (link . ,link-transcoder))))
 	   (publish
 	    (lambda (plist filename pub-dir)
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index d0810de9d..1de13def6 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -139,8 +139,8 @@ test-org-export/bind-keyword
           (org-export-as
            (org-export-create-backend
             :transcoders
-            '((section . (lambda (s c i)
-                           (if (eq test-ox-var 'value) "Yes" "No"))))))))))
+            `((section . ,(lambda (_s _c _i)
+                            (if (eq test-ox-var 'value) "Yes" "No"))))))))))
     ;; Seen from elisp code blocks as well.
     (should
      (string-match-p
@@ -575,9 +575,9 @@ test-org-export/set-title
 	(org-export-as
 	 (org-export-create-backend
 	  :transcoders
-	  '((template . (lambda (text info)
-			  (org-element-interpret-data
-			   (plist-get info :title)))))))))))
+	  `((template . ,(lambda (text info)
+			   (org-element-interpret-data
+			    (plist-get info :title)))))))))))
   ;; With a blank TITLE keyword.
   (should
    (equal
-- 
2.55.0

Reply via email to