浏览代码

Silence byte-compiler

* lisp/ox.el (org-export-backend):
(org-export-define-backend):
(org-export-define-derived-backend):
(org-export--get-subtree-options):
(org-export--get-inbuffer-options):
(org-export--collect-headline-numbering):
(org-export--selected-trees):
(org-export--skip-p):
(org-export--delete-comments):
(org-export--remove-uninterpreted-data-1):
(org-export--merge-external-footnote-definitions):
(org-export-insert-default-template):
(org-export-expand-include-keyword):
(org-export--inclusion-absolute-lines):
(org-export-collect-footnote-definitions):
(org-export-get-footnote-number):
(org-export-get-reference):
(org-export-get-ordinal):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default):
(org-export-table-has-header-p):
(org-export-table-row-group):
(org-export-table-cell-alignment):
(org-export-table-row-number):
(org-export-table-dimensions):
(org-export-table-cell-address):
(org-export-get-table-cell-at):
(org-export--smart-quote-status):
(org-export-get-previous-element):
(org-export-get-next-element):
(org-export-dispatch):
(org-export--dispatch-ui):
(org-export--dispatch-action): Silence byte-compiler.
Nicolas Goaziou 9 年之前
父节点
当前提交
80a6262ca1
共有 1 个文件被更改,包括 56 次插入55 次删除
  1. 56 55
      lisp/ox.el

+ 56 - 55
lisp/ox.el

@@ -921,8 +921,8 @@ mode."
 ;; Eventually `org-export-barf-if-invalid-backend' returns an error
 ;; Eventually `org-export-barf-if-invalid-backend' returns an error
 ;; when a given back-end hasn't been registered yet.
 ;; when a given back-end hasn't been registered yet.
 
 
-(defstruct (org-export-backend (:constructor org-export-create-backend)
-			       (:copier nil))
+(cl-defstruct (org-export-backend (:constructor org-export-create-backend)
+				  (:copier nil))
   name parent transcoders options filters blocks menu)
   name parent transcoders options filters blocks menu)
 
 
 (defun org-export-get-backend (name)
 (defun org-export-get-backend (name)
@@ -1153,7 +1153,7 @@ keywords are understood:
   (let (blocks filters menu-entry options)
   (let (blocks filters menu-entry options)
     (while (keywordp (car body))
     (while (keywordp (car body))
       (let ((keyword (pop body)))
       (let ((keyword (pop body)))
-	(case keyword
+	(cl-case keyword
 	  (:export-block (let ((names (pop body)))
 	  (:export-block (let ((names (pop body)))
 			   (setq blocks (if (consp names) (mapcar 'upcase names)
 			   (setq blocks (if (consp names) (mapcar 'upcase names)
 					  (list (upcase names))))))
 					  (list (upcase names))))))
@@ -1225,7 +1225,7 @@ The back-end could then be called with, for example:
   (let (blocks filters menu-entry options transcoders)
   (let (blocks filters menu-entry options transcoders)
     (while (keywordp (car body))
     (while (keywordp (car body))
       (let ((keyword (pop body)))
       (let ((keyword (pop body)))
-	(case keyword
+	(cl-case keyword
 	  (:export-block (let ((names (pop body)))
 	  (:export-block (let ((names (pop body)))
 			   (setq blocks (if (consp names) (mapcar 'upcase names)
 			   (setq blocks (if (consp names) (mapcar 'upcase names)
 					  (list (upcase names))))))
 					  (list (upcase names))))))
@@ -1397,7 +1397,7 @@ for export.  Return options as a plist."
 	       (setq plist
 	       (setq plist
 		     (plist-put plist
 		     (plist-put plist
 				property
 				property
-				(case (nth 4 option)
+				(cl-case (nth 4 option)
 				  (parse
 				  (parse
 				   (org-element-parse-secondary-string
 				   (org-element-parse-secondary-string
 				    value (org-element-restriction 'keyword)))
 				    value (org-element-restriction 'keyword)))
@@ -1428,7 +1428,7 @@ Assume buffer is in Org mode.  Narrowing, if any, is ignored."
 		(let (properties)
 		(let (properties)
 		  (dolist (option options properties)
 		  (dolist (option options properties)
 		    (when (equal (nth 1 option) keyword)
 		    (when (equal (nth 1 option) keyword)
-		      (pushnew (car option) properties))))))
+		      (cl-pushnew (car option) properties))))))
 	     (get-options
 	     (get-options
 	      (lambda (&optional files)
 	      (lambda (&optional files)
 		;; Recursively read keywords in buffer.  FILES is
 		;; Recursively read keywords in buffer.  FILES is
@@ -1477,7 +1477,7 @@ Assume buffer is in Org mode.  Narrowing, if any, is ignored."
 			       plist property
 			       plist property
 			       ;; Handle value depending on specified
 			       ;; Handle value depending on specified
 			       ;; BEHAVIOR.
 			       ;; BEHAVIOR.
-			       (case (nth 4 (assq property options))
+			       (cl-case (nth 4 (assq property options))
 				 (parse
 				 (parse
 				  (unless (memq property to-parse)
 				  (unless (memq property to-parse)
 				    (push property to-parse))
 				    (push property to-parse))
@@ -1684,11 +1684,12 @@ for a footnotes section."
 		 (1- (org-export-get-relative-level headline options))))
 		 (1- (org-export-get-relative-level headline options))))
 	    (cons
 	    (cons
 	     headline
 	     headline
-	     (loop for n across numbering
-		   for idx from 0 to org-export-max-depth
-		   when (< idx relative-level) collect n
-		   when (= idx relative-level) collect (aset numbering idx (1+ n))
-		   when (> idx relative-level) do (aset numbering idx 0))))))
+	     (cl-loop
+	      for n across numbering
+	      for idx from 0 to org-export-max-depth
+	      when (< idx relative-level) collect n
+	      when (= idx relative-level) collect (aset numbering idx (1+ n))
+	      when (> idx relative-level) do (aset numbering idx 0))))))
       options)))
       options)))
 
 
 (defun org-export--selected-trees (data info)
 (defun org-export--selected-trees (data info)
@@ -1702,8 +1703,8 @@ INFO is a plist holding export options."
 		(cond
 		(cond
 		 ((memq type '(headline inlinetask))
 		 ((memq type '(headline inlinetask))
 		  (let ((tags (org-element-property :tags data)))
 		  (let ((tags (org-element-property :tags data)))
-		    (if (loop for tag in (plist-get info :select-tags)
-			      thereis (member tag tags))
+		    (if (cl-loop for tag in (plist-get info :select-tags)
+				 thereis (member tag tags))
 			;; When a select tag is found, mark full
 			;; When a select tag is found, mark full
 			;; genealogy and every headline within the
 			;; genealogy and every headline within the
 			;; tree as acceptable.
 			;; tree as acceptable.
@@ -1730,7 +1731,7 @@ INFO is a plist holding export options."
 OPTIONS is the plist holding export options.  SELECTED, when
 OPTIONS is the plist holding export options.  SELECTED, when
 non-nil, is a list of headlines or inlinetasks belonging to
 non-nil, is a list of headlines or inlinetasks belonging to
 a tree with a select tag."
 a tree with a select tag."
-  (case (org-element-type blob)
+  (cl-case (org-element-type blob)
     (clock (not (plist-get options :with-clocks)))
     (clock (not (plist-get options :with-clocks)))
     (drawer
     (drawer
      (let ((with-drawers-p (plist-get options :with-drawers)))
      (let ((with-drawers-p (plist-get options :with-drawers)))
@@ -1757,8 +1758,8 @@ a tree with a select tag."
 	(and (eq (org-element-type blob) 'inlinetask)
 	(and (eq (org-element-type blob) 'inlinetask)
 	     (not (plist-get options :with-inlinetasks)))
 	     (not (plist-get options :with-inlinetasks)))
 	;; Ignore subtrees with an exclude tag.
 	;; Ignore subtrees with an exclude tag.
-	(loop for k in (plist-get options :exclude-tags)
-	      thereis (member k tags))
+	(cl-loop for k in (plist-get options :exclude-tags)
+		 thereis (member k tags))
 	;; When a select tag is present in the buffer, ignore any tree
 	;; When a select tag is present in the buffer, ignore any tree
 	;; without it.
 	;; without it.
 	(and selected (not (memq blob selected)))
 	(and selected (not (memq blob selected)))
@@ -1800,7 +1801,7 @@ a tree with a select tag."
 			 (lambda (obj)
 			 (lambda (obj)
 			   (or (not (stringp obj)) (org-string-nw-p obj)))
 			   (or (not (stringp obj)) (org-string-nw-p obj)))
 			 options t))))
 			 options t))))
-       (case (plist-get options :with-timestamps)
+       (cl-case (plist-get options :with-timestamps)
 	 ((nil) t)
 	 ((nil) t)
 	 (active
 	 (active
 	  (not (memq (org-element-property :type blob) '(active active-range))))
 	  (not (memq (org-element-property :type blob) '(active active-range))))
@@ -2585,7 +2586,7 @@ block are preserved.  Narrowing, if any, is ignored."
 	 (case-fold-search t))
 	 (case-fold-search t))
      (while (re-search-forward regexp nil t)
      (while (re-search-forward regexp nil t)
        (let ((e (org-element-at-point)))
        (let ((e (org-element-at-point)))
-	 (case (org-element-type e)
+	 (cl-case (org-element-type e)
 	   ((comment comment-block)
 	   ((comment comment-block)
 	    (delete-region (org-element-property :begin e)
 	    (delete-region (org-element-property :begin e)
 			   (progn (goto-char (org-element-property :end e))
 			   (progn (goto-char (org-element-property :end e))
@@ -2676,7 +2677,7 @@ returned by the function."
 	       subscript superscript underline)
 	       subscript superscript underline)
     (lambda (blob)
     (lambda (blob)
       (let ((new
       (let ((new
-	     (case (org-element-type blob)
+	     (cl-case (org-element-type blob)
 	       ;; ... entities...
 	       ;; ... entities...
 	       (entity
 	       (entity
 		(and (not (plist-get info :with-entities))
 		(and (not (plist-get info :with-entities))
@@ -2688,7 +2689,7 @@ returned by the function."
 	       ;; ... emphasis...
 	       ;; ... emphasis...
 	       ((bold italic strike-through underline)
 	       ((bold italic strike-through underline)
 		(and (not (plist-get info :with-emphasize))
 		(and (not (plist-get info :with-emphasize))
-		     (let ((marker (case (org-element-type blob)
+		     (let ((marker (cl-case (org-element-type blob)
 				     (bold "*")
 				     (bold "*")
 				     (italic "/")
 				     (italic "/")
 				     (strike-through "+")
 				     (strike-through "+")
@@ -2755,7 +2756,7 @@ not, are considered."
       (let* ((definitions)
       (let* ((definitions)
 	     (push-definition
 	     (push-definition
 	      (lambda (datum)
 	      (lambda (datum)
-		(case (org-element-type datum)
+		(cl-case (org-element-type datum)
 		  (footnote-definition
 		  (footnote-definition
 		   (push (save-restriction
 		   (push (save-restriction
 			   (narrow-to-region (org-element-property :begin datum)
 			   (narrow-to-region (org-element-property :begin datum)
@@ -3117,7 +3118,7 @@ locally for the subtree through node properties."
 			  (< (+ width (length (car items)) 1) fill-column))
 			  (< (+ width (length (car items)) 1) fill-column))
 		(let ((item (pop items)))
 		(let ((item (pop items)))
 		  (insert " " item)
 		  (insert " " item)
-		  (incf width (1+ (length item))))))
+		  (cl-incf width (1+ (length item))))))
 	    (insert "\n")))))
 	    (insert "\n")))))
     ;; Then the rest of keywords, in the order specified in either
     ;; Then the rest of keywords, in the order specified in either
     ;; `org-export-options-alist' or respective export back-ends.
     ;; `org-export-options-alist' or respective export back-ends.
@@ -3263,7 +3264,7 @@ storing and resolving footnotes.  It is created automatically."
 		      (org-export--prepare-file-contents
 		      (org-export--prepare-file-contents
 		       file lines ind minlevel
 		       file lines ind minlevel
 		       (or (gethash file file-prefix)
 		       (or (gethash file file-prefix)
-			   (puthash file (incf current-prefix) file-prefix))
+			   (puthash file (cl-incf current-prefix) file-prefix))
 		       footnotes)))
 		       footnotes)))
 		   (org-export-expand-include-keyword
 		   (org-export-expand-include-keyword
 		    (cons (list file lines) included)
 		    (cons (list file lines) included)
@@ -3337,7 +3338,7 @@ Return a string of lines to be included in the format expected by
 		(save-excursion
 		(save-excursion
 		  (+ start-line
 		  (+ start-line
 		     (let ((counter 0))
 		     (let ((counter 0))
-		       (while (< (point) end) (incf counter) (forward-line))
+		       (while (< (point) end) (cl-incf counter) (forward-line))
 		       counter))))))))
 		       counter))))))))
 
 
 (defun org-export--update-footnote-label (ref-begin digit-label id)
 (defun org-export--update-footnote-label (ref-begin digit-label id)
@@ -3724,7 +3725,7 @@ for inlined footnotes.  Unreferenced definitions are ignored."
        ;; Collect footnote number, label and definition.
        ;; Collect footnote number, label and definition.
        (let ((l (org-element-property :label f)))
        (let ((l (org-element-property :label f)))
 	 (unless (and l (member l labels))
 	 (unless (and l (member l labels))
-	   (incf n)
+	   (cl-incf n)
 	   (push (list n l (org-export-get-footnote-definition f info)) alist))
 	   (push (list n l (org-export-get-footnote-definition f info)) alist))
 	 (when l (push l labels))))
 	 (when l (push l labels))))
      (or data (plist-get info :parse-tree)) info body-first)
      (or data (plist-get info :parse-tree)) info body-first)
@@ -3783,8 +3784,8 @@ process, leading to a different order when footnotes are nested."
 	    ((and label l (string= label l)) (throw 'exit (1+ count)))
 	    ((and label l (string= label l)) (throw 'exit (1+ count)))
 	    ;; Otherwise store label and increase counter if label
 	    ;; Otherwise store label and increase counter if label
 	    ;; wasn't encountered yet.
 	    ;; wasn't encountered yet.
-	    ((not l) (incf count))
-	    ((not (member l seen)) (push l seen) (incf count)))))
+	    ((not l) (cl-incf count))
+	    ((not (member l seen)) (push l seen) (cl-incf count)))))
        (or data (plist-get info :parse-tree)) info body-first))))
        (or data (plist-get info :parse-tree)) info body-first))))
 
 
 
 
@@ -4230,7 +4231,7 @@ alphanumeric characters only."
 			 (if type
 			 (if type
 			     (replace-regexp-in-string "-" "" (symbol-name type))
 			     (replace-regexp-in-string "-" "" (symbol-name type))
 			   "secondarystring")
 			   "secondarystring")
-			 (incf (gethash type cache 0)))
+			 (cl-incf (gethash type cache 0)))
 		 cache))))
 		 cache))))
 
 
 (defun org-export-get-ordinal (element info &optional types predicate)
 (defun org-export-get-ordinal (element info &optional types predicate)
@@ -4263,7 +4264,7 @@ objects of the same type."
 	  (org-element-lineage
 	  (org-element-lineage
 	   element
 	   element
 	   '(footnote-definition footnote-reference headline item table))))
 	   '(footnote-definition footnote-reference headline item table))))
-  (case (org-element-type element)
+  (cl-case (org-element-type element)
     ;; Special case 1: A headline returns its number as a list.
     ;; Special case 1: A headline returns its number as a list.
     (headline (org-export-get-headline-number element info))
     (headline (org-export-get-headline-number element info))
     ;; Special case 2: An item returns its number as a list.
     ;; Special case 2: An item returns its number as a list.
@@ -4283,8 +4284,8 @@ objects of the same type."
 	 (lambda (el)
 	 (lambda (el)
 	   (cond
 	   (cond
 	    ((eq element el) (1+ counter))
 	    ((eq element el) (1+ counter))
-	    ((not predicate) (incf counter) nil)
-	    ((funcall predicate el info) (incf counter) nil)))
+	    ((not predicate) (cl-incf counter) nil)
+	    ((funcall predicate el info) (cl-incf counter) nil)))
 	 info 'first-match)))))
 	 info 'first-match)))))
 
 
 
 
@@ -4374,7 +4375,7 @@ reference on that line (string)."
      (org-element-normalize-string
      (org-element-normalize-string
       (mapconcat
       (mapconcat
        (lambda (loc)
        (lambda (loc)
-	 (incf line)
+	 (cl-incf line)
 	 (if (not (string-match with-ref-re loc)) loc
 	 (if (not (string-match with-ref-re loc)) loc
 	   ;; Ref line: remove ref, and signal its position in REFS.
 	   ;; Ref line: remove ref, and signal its position in REFS.
 	   (push (cons line (match-string 3 loc)) refs)
 	   (push (cons line (match-string 3 loc)) refs)
@@ -4407,7 +4408,7 @@ be nil.  It can be obtained through the use of
     (org-element-normalize-string
     (org-element-normalize-string
      (mapconcat
      (mapconcat
       (lambda (--loc)
       (lambda (--loc)
-	(incf --line)
+	(cl-incf --line)
 	(let ((--ref (cdr (assq --line ref-alist))))
 	(let ((--ref (cdr (assq --line ref-alist))))
 	  (funcall fun --loc (and num-lines (+ num-lines --line)) --ref)))
 	  (funcall fun --loc (and num-lines (+ num-lines --line)) --ref)))
       --locs "\n"))))
       --locs "\n"))))
@@ -4432,7 +4433,7 @@ code."
       (let* ((refs (and (org-element-property :retain-labels element)
       (let* ((refs (and (org-element-property :retain-labels element)
 			(cdr code-info)))
 			(cdr code-info)))
 	     ;; Handle line numbering.
 	     ;; Handle line numbering.
-	     (num-start (case (org-element-property :number-lines element)
+	     (num-start (cl-case (org-element-property :number-lines element)
 			  (continued (org-export-get-loc element info))
 			  (continued (org-export-get-loc element info))
 			  (new 0)))
 			  (new 0)))
 	     (num-fmt
 	     (num-fmt
@@ -4530,7 +4531,7 @@ A table has a header when it contains at least two row groups."
 	       (cond
 	       (cond
 		((> rowgroup 1) t)
 		((> rowgroup 1) t)
 		((and row-flag (eq (org-element-property :type row) 'rule))
 		((and row-flag (eq (org-element-property :type row) 'rule))
-		 (incf rowgroup) (setq row-flag nil))
+		 (cl-incf rowgroup) (setq row-flag nil))
 		((and (not row-flag) (eq (org-element-property :type row)
 		((and (not row-flag) (eq (org-element-property :type row)
 					 'standard))
 					 'standard))
 		 (setq row-flag t) nil)))
 		 (setq row-flag t) nil)))
@@ -4590,7 +4591,7 @@ header."
 		 (lambda (row)
 		 (lambda (row)
 		   (if (eq (org-element-property :type row) 'rule)
 		   (if (eq (org-element-property :type row) 'rule)
 		       (setq row-flag nil)
 		       (setq row-flag nil)
-		     (unless row-flag (incf group) (setq row-flag t)))
+		     (unless row-flag (cl-incf group) (setq row-flag t)))
 		   (when (eq table-row row) (puthash table-row group cache)))
 		   (when (eq table-row row) (puthash table-row group cache)))
 		 info 'first-match))))))
 		 info 'first-match))))))
 
 
@@ -4690,14 +4691,14 @@ Possible values are `left', `right' and `center'."
 			    (org-element-contents
 			    (org-element-contents
 			     (elt (org-element-contents row) column))
 			     (elt (org-element-contents row) column))
 			    info)))
 			    info)))
-		(incf total-cells)
+		(cl-incf total-cells)
 		;; Treat an empty cell as a number if it follows
 		;; Treat an empty cell as a number if it follows
 		;; a number.
 		;; a number.
 		(if (not (or (string-match org-table-number-regexp value)
 		(if (not (or (string-match org-table-number-regexp value)
 			     (and (string= value "") previous-cell-number-p)))
 			     (and (string= value "") previous-cell-number-p)))
 		    (setq previous-cell-number-p nil)
 		    (setq previous-cell-number-p nil)
 		  (setq previous-cell-number-p t)
 		  (setq previous-cell-number-p t)
-		  (incf number-cells))))))
+		  (cl-incf number-cells))))))
 	  ;; Return value.  Alignment specified by cookies has
 	  ;; Return value.  Alignment specified by cookies has
 	  ;; precedence over alignment deduced from cell's contents.
 	  ;; precedence over alignment deduced from cell's contents.
 	  (aset align-vector
 	  (aset align-vector
@@ -4870,7 +4871,7 @@ special columns and separators."
 	(lambda (row)
 	(lambda (row)
 	  (cond ((eq row table-row) number)
 	  (cond ((eq row table-row) number)
 		((eq (org-element-property :type row) 'standard)
 		((eq (org-element-property :type row) 'standard)
-		 (incf number) nil)))
+		 (cl-incf number) nil)))
 	info 'first-match))))
 	info 'first-match))))
 
 
 (defun org-export-table-dimensions (table info)
 (defun org-export-table-dimensions (table info)
@@ -4886,10 +4887,10 @@ rows (resp. columns)."
     (org-element-map table 'table-row
     (org-element-map table 'table-row
       (lambda (row)
       (lambda (row)
 	(when (eq (org-element-property :type row) 'standard)
 	(when (eq (org-element-property :type row) 'standard)
-	  (incf rows)
+	  (cl-incf rows)
 	  (unless first-row (setq first-row row)))) info)
 	  (unless first-row (setq first-row row)))) info)
     ;; Set number of columns.
     ;; Set number of columns.
-    (org-element-map first-row 'table-cell (lambda (_) (incf columns)) info)
+    (org-element-map first-row 'table-cell (lambda (_) (cl-incf columns)) info)
     ;; Return value.
     ;; Return value.
     (cons rows columns)))
     (cons rows columns)))
 
 
@@ -4909,7 +4910,7 @@ function returns nil for other cells."
 	    (let ((col-count 0))
 	    (let ((col-count 0))
 	      (org-element-map table-row 'table-cell
 	      (org-element-map table-row 'table-cell
 		(lambda (cell)
 		(lambda (cell)
-		  (if (eq cell table-cell) col-count (incf col-count) nil))
+		  (if (eq cell table-cell) col-count (cl-incf col-count) nil))
 		info 'first-match))))))
 		info 'first-match))))))
 
 
 (defun org-export-get-table-cell-at (address table info)
 (defun org-export-get-table-cell-at (address table info)
@@ -4929,12 +4930,12 @@ return nil."
 	    (lambda (row)
 	    (lambda (row)
 	      (cond ((eq (org-element-property :type row) 'rule) nil)
 	      (cond ((eq (org-element-property :type row) 'rule) nil)
 		    ((= row-count row-pos) row)
 		    ((= row-count row-pos) row)
-		    (t (incf row-count) nil)))
+		    (t (cl-incf row-count) nil)))
 	    info 'first-match))
 	    info 'first-match))
 	'table-cell
 	'table-cell
       (lambda (cell)
       (lambda (cell)
 	(if (= column-count column-pos) cell
 	(if (= column-count column-pos) cell
-	  (incf column-count) nil))
+	  (cl-incf column-count) nil))
       info 'first-match)))
       info 'first-match)))
 
 
 
 
@@ -5168,7 +5169,7 @@ INFO is the current export state, as a plist."
 	  (lambda (text)
 	  (lambda (text)
 	    (let ((start 0) current-status)
 	    (let ((start 0) current-status)
 	      (while (setq start (string-match "['\"]" text start))
 	      (while (setq start (string-match "['\"]" text start))
-		(incf start)
+		(cl-incf start)
 		(push
 		(push
 		 (cond
 		 (cond
 		  ((equal (match-string 0 text) "\"")
 		  ((equal (match-string 0 text) "\"")
@@ -5305,7 +5306,7 @@ all of them."
 	      ((null n) (throw 'exit obj))
 	      ((null n) (throw 'exit obj))
 	      ((not (wholenump n)) (push obj prev))
 	      ((not (wholenump n)) (push obj prev))
 	      ((zerop n) (throw 'exit prev))
 	      ((zerop n) (throw 'exit prev))
-	      (t (decf n) (push obj prev)))))))
+	      (t (cl-decf n) (push obj prev)))))))
 
 
 (defun org-export-get-next-element (blob info &optional n)
 (defun org-export-get-next-element (blob info &optional n)
   "Return next element or object.
   "Return next element or object.
@@ -5331,7 +5332,7 @@ them."
 	      ((null n) (throw 'exit obj))
 	      ((null n) (throw 'exit obj))
 	      ((not (wholenump n)) (push obj next))
 	      ((not (wholenump n)) (push obj next))
 	      ((zerop n) (throw 'exit (nreverse next)))
 	      ((zerop n) (throw 'exit (nreverse next)))
-	      (t (decf n) (push obj next)))))))
+	      (t (cl-decf n) (push obj next)))))))
 
 
 
 
 ;;;; Translation
 ;;;; Translation
@@ -6128,7 +6129,7 @@ When ARG is \\[universal-argument] \\[universal-argument], display the asynchron
 	 (optns (cdr input)))
 	 (optns (cdr input)))
     (unless (memq 'subtree optns)
     (unless (memq 'subtree optns)
       (move-marker org-export-dispatch-last-position nil))
       (move-marker org-export-dispatch-last-position nil))
-    (case action
+    (cl-case action
       ;; First handle special hard-coded actions.
       ;; First handle special hard-coded actions.
       (template (org-export-insert-default-template nil optns))
       (template (org-export-insert-default-template nil optns))
       (stack (org-export-stack))
       (stack (org-export-stack))
@@ -6267,7 +6268,7 @@ back to standard interface."
 			   (concat
 			   (concat
 			    (mapconcat
 			    (mapconcat
 			     (lambda (sub-entry)
 			     (lambda (sub-entry)
-			       (incf index)
+			       (cl-incf index)
 			       (format
 			       (format
 				(if (zerop (mod index 2)) "    [%s] %-26s"
 				(if (zerop (mod index 2)) "    [%s] %-26s"
 				  "[%s] %s\n")
 				  "[%s] %s\n")
@@ -6338,7 +6339,7 @@ back to standard interface."
        standard-prompt allowed-keys entries options first-key expertp))))
        standard-prompt allowed-keys entries options first-key expertp))))
 
 
 (defun org-export--dispatch-action
 (defun org-export--dispatch-action
-  (prompt allowed-keys entries options first-key expertp)
+    (prompt allowed-keys entries options first-key expertp)
   "Read a character from command input and act accordingly.
   "Read a character from command input and act accordingly.
 
 
 PROMPT is the displayed prompt, as a string.  ALLOWED-KEYS is
 PROMPT is the displayed prompt, as a string.  ALLOWED-KEYS is
@@ -6356,7 +6357,7 @@ options as CDR."
     (while (and (setq key (read-char-exclusive prompt))
     (while (and (setq key (read-char-exclusive prompt))
 		(not expertp)
 		(not expertp)
 		(memq key '(14 16 ?\s ?\d)))
 		(memq key '(14 16 ?\s ?\d)))
-      (case key
+      (cl-case key
 	(14 (if (not (pos-visible-in-window-p (point-max)))
 	(14 (if (not (pos-visible-in-window-p (point-max)))
 		(ignore-errors (scroll-up 1))
 		(ignore-errors (scroll-up 1))
 	      (message "End of buffer")
 	      (message "End of buffer")
@@ -6393,8 +6394,8 @@ options as CDR."
      ;; Toggle options: C-b (2) C-v (22) C-s (19) C-f (6) C-a (1).
      ;; Toggle options: C-b (2) C-v (22) C-s (19) C-f (6) C-a (1).
      ((memq key '(2 22 19 6 1))
      ((memq key '(2 22 19 6 1))
       (org-export--dispatch-ui
       (org-export--dispatch-ui
-       (let ((option (case key (2 'body) (22 'visible) (19 'subtree)
-			   (6 'force) (1 'async))))
+       (let ((option (cl-case key (2 'body) (22 'visible) (19 'subtree)
+			      (6 'force) (1 'async))))
 	 (if (memq option options) (remq option options)
 	 (if (memq option options) (remq option options)
 	   (cons option options)))
 	   (cons option options)))
        first-key expertp))
        first-key expertp))
@@ -6406,7 +6407,7 @@ options as CDR."
 	     ;; Publishing actions are hard-coded.  Send a special
 	     ;; Publishing actions are hard-coded.  Send a special
 	     ;; signal to `org-export-dispatch'.
 	     ;; signal to `org-export-dispatch'.
 	     ((eq first-key ?P)
 	     ((eq first-key ?P)
-	      (case key
+	      (cl-case key
 		(?f 'publish-current-file)
 		(?f 'publish-current-file)
 		(?p 'publish-current-project)
 		(?p 'publish-current-project)
 		(?x 'publish-choose-project)
 		(?x 'publish-choose-project)