diff options
| author | Stefan Kangas | 2025-02-24 19:27:21 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-02-24 19:27:47 +0100 |
| commit | 0eada9e1d30b9072cdc1bf8388205773cd23986f (patch) | |
| tree | a62c28a16586b815dd652a07667714651fca5e27 | |
| parent | ee04b7da8059acb230fe32f508947ecb6a24b7e2 (diff) | |
| download | emacs-0eada9e1d30b9072cdc1bf8388205773cd23986f.tar.gz emacs-0eada9e1d30b9072cdc1bf8388205773cd23986f.zip | |
Prefer incf to cl-incf in textmodes/*.el
* lisp/textmodes/css-mode.el (css--rgb-color):
* lisp/textmodes/reftex-dcr.el (reftex-view-regexp-match):
* lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels)
(reftex-renumber-simple-labels, reftex-translate):
* lisp/textmodes/reftex-index.el (reftex-index-select-tag)
(reftex-index-phrases-info, reftex-query-index-phrase):
* lisp/textmodes/reftex-parse.el (reftex-where-am-I)
(reftex-what-macro, reftex-nth-arg, reftex-section-number):
* lisp/textmodes/reftex-ref.el (reftex-uniquify-label):
* lisp/textmodes/reftex-sel.el (reftex-insert-docstruct):
* lisp/textmodes/reftex.el (reftex-next-multifile-index)
(reftex-compile-variables, reftex-parse-args)
(reftex-select-external-document):
* lisp/textmodes/rst.el (rst-display-hdr-hierarchy)
(rst-toc-insert-children, rst-apply-indented-blocks)
(rst-enumerate-region, rst-convert-bullets-to-enumeration):
* lisp/textmodes/tex-mode.el (tex-count-words): Prefer incf to cl-incf.
| -rw-r--r-- | lisp/textmodes/css-mode.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-dcr.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-global.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-index.el | 16 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-parse.el | 18 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-ref.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-sel.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/reftex.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/rst.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 2 |
10 files changed, 37 insertions, 37 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 35c61e4f66d..41fffbe6a60 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -1080,12 +1080,12 @@ the returned hex string." | |||
| 1080 | (push (min (max 0 (round number)) 255) result) | 1080 | (push (min (max 0 (round number)) 255) result) |
| 1081 | (goto-char (match-end 0)) | 1081 | (goto-char (match-end 0)) |
| 1082 | (css--color-skip-blanks) | 1082 | (css--color-skip-blanks) |
| 1083 | (cl-incf iter) | 1083 | (incf iter) |
| 1084 | ;; Accept a superset of the CSS syntax since I'm feeling lazy. | 1084 | ;; Accept a superset of the CSS syntax since I'm feeling lazy. |
| 1085 | (when (and (= (skip-chars-forward ",/") 0) | 1085 | (when (and (= (skip-chars-forward ",/") 0) |
| 1086 | (= iter 3)) | 1086 | (= iter 3)) |
| 1087 | ;; The alpha is optional. | 1087 | ;; The alpha is optional. |
| 1088 | (cl-incf iter)) | 1088 | (incf iter)) |
| 1089 | (css--color-skip-blanks))) | 1089 | (css--color-skip-blanks))) |
| 1090 | (when (looking-at ")") | 1090 | (when (looking-at ")") |
| 1091 | (forward-char) | 1091 | (forward-char) |
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 3b02b550913..77516ca840a 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el | |||
| @@ -415,7 +415,7 @@ Calling this function several times find successive citation locations." | |||
| 415 | (if match | 415 | (if match |
| 416 | (progn | 416 | (progn |
| 417 | (put 'reftex-view-regexp-match :props newprop) | 417 | (put 'reftex-view-regexp-match :props newprop) |
| 418 | (put 'reftex-view-regexp-match :cnt (cl-incf cnt)) | 418 | (put 'reftex-view-regexp-match :cnt (incf cnt)) |
| 419 | (reftex-highlight 0 (match-beginning highlight-group) | 419 | (reftex-highlight 0 (match-beginning highlight-group) |
| 420 | (match-end highlight-group)) | 420 | (match-end highlight-group)) |
| 421 | (add-hook 'pre-command-hook #'reftex-highlight-shall-die) | 421 | (add-hook 'pre-command-hook #'reftex-highlight-shall-die) |
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 20af2d72837..20abd36192d 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el | |||
| @@ -169,7 +169,7 @@ No active TAGS table is required." | |||
| 169 | (while dlist | 169 | (while dlist |
| 170 | (when (and (car (car dlist)) | 170 | (when (and (car (car dlist)) |
| 171 | (cdr (car dlist))) | 171 | (cdr (car dlist))) |
| 172 | (cl-incf cnt) | 172 | (incf cnt) |
| 173 | (insert (mapconcat #'identity (car dlist) "\n ") "\n")) | 173 | (insert (mapconcat #'identity (car dlist) "\n ") "\n")) |
| 174 | (pop dlist)) | 174 | (pop dlist)) |
| 175 | (goto-char (point-min)) | 175 | (goto-char (point-min)) |
| @@ -238,7 +238,7 @@ one with the `xr' package." | |||
| 238 | (if (assoc label translate-alist) | 238 | (if (assoc label translate-alist) |
| 239 | (error "Duplicate label %s" label)) | 239 | (error "Duplicate label %s" label)) |
| 240 | (setq new-label (concat (match-string 1 (car entry)) | 240 | (setq new-label (concat (match-string 1 (car entry)) |
| 241 | (int-to-string (cl-incf (cdr nr-cell))))) | 241 | (int-to-string (incf (cdr nr-cell))))) |
| 242 | (push (cons label new-label) translate-alist) | 242 | (push (cons label new-label) translate-alist) |
| 243 | (or (string= label new-label) (setq changed-sequence t)))) | 243 | (or (string= label new-label) (setq changed-sequence t)))) |
| 244 | 244 | ||
| @@ -350,7 +350,7 @@ one with the `xr' package." | |||
| 350 | (error "Abort"))) | 350 | (error "Abort"))) |
| 351 | (reftex-unhighlight 1))) | 351 | (reftex-unhighlight 1))) |
| 352 | ((and test cell) | 352 | ((and test cell) |
| 353 | (cl-incf n)) | 353 | (incf n)) |
| 354 | ((and (not test) cell) | 354 | ((and (not test) cell) |
| 355 | ;; Replace | 355 | ;; Replace |
| 356 | (goto-char (match-beginning 1)) | 356 | (goto-char (match-beginning 1)) |
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 5d4b1f38236..db6ebb4caf8 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el | |||
| @@ -210,16 +210,16 @@ will prompt for other arguments." | |||
| 210 | i -1 | 210 | i -1 |
| 211 | val nil) | 211 | val nil) |
| 212 | (catch 'exit | 212 | (catch 'exit |
| 213 | (while (and (< (cl-incf i) len) (null val)) | 213 | (while (and (< (incf i) len) (null val)) |
| 214 | (unless (assq (aref tag i) tag-alist) | 214 | (unless (assq (aref tag i) tag-alist) |
| 215 | (push (list (aref tag i) | 215 | (push (list (aref tag i) |
| 216 | tag | 216 | tag |
| 217 | (concat (substring tag 0 i) | 217 | (concat (substring tag 0 i) |
| 218 | "[" (substring tag i (cl-incf i)) "]" | 218 | "[" (substring tag i (incf i)) "]" |
| 219 | (substring tag i))) | 219 | (substring tag i))) |
| 220 | tag-alist) | 220 | tag-alist) |
| 221 | (throw 'exit t))) | 221 | (throw 'exit t))) |
| 222 | (push (list (+ ?0 (cl-incf cnt)) tag | 222 | (push (list (+ ?0 (incf cnt)) tag |
| 223 | (concat "[" (int-to-string cnt) "]:" tag)) | 223 | (concat "[" (int-to-string cnt) "]:" tag)) |
| 224 | tag-alist))) | 224 | tag-alist))) |
| 225 | (setq tag-alist (nreverse tag-alist)) | 225 | (setq tag-alist (nreverse tag-alist)) |
| @@ -1622,11 +1622,11 @@ this function repeatedly." | |||
| 1622 | (widen) | 1622 | (widen) |
| 1623 | (goto-char (point-min)) | 1623 | (goto-char (point-min)) |
| 1624 | (while (re-search-forward re1 nil t) | 1624 | (while (re-search-forward re1 nil t) |
| 1625 | (cl-incf ntimes1)) | 1625 | (incf ntimes1)) |
| 1626 | (goto-char (point-min)) | 1626 | (goto-char (point-min)) |
| 1627 | (while (re-search-forward re2 nil t) | 1627 | (while (re-search-forward re2 nil t) |
| 1628 | (push (cons (count-lines 1 (point)) (match-string 1)) superphrases) | 1628 | (push (cons (count-lines 1 (point)) (match-string 1)) superphrases) |
| 1629 | (cl-incf ntimes2)))) | 1629 | (incf ntimes2)))) |
| 1630 | (save-current-buffer | 1630 | (save-current-buffer |
| 1631 | (while (setq file (pop files)) | 1631 | (while (setq file (pop files)) |
| 1632 | (setq buf (reftex-get-file-buffer-force file)) | 1632 | (setq buf (reftex-get-file-buffer-force file)) |
| @@ -1639,7 +1639,7 @@ this function repeatedly." | |||
| 1639 | (let ((case-fold-search reftex-index-phrases-case-fold-search)) | 1639 | (let ((case-fold-search reftex-index-phrases-case-fold-search)) |
| 1640 | (while (re-search-forward re nil t) | 1640 | (while (re-search-forward re nil t) |
| 1641 | (or (reftex-in-comment) | 1641 | (or (reftex-in-comment) |
| 1642 | (cl-incf nmatches))))))))) | 1642 | (incf nmatches))))))))) |
| 1643 | (with-output-to-temp-buffer "*Help*" | 1643 | (with-output-to-temp-buffer "*Help*" |
| 1644 | (princ (format " Phrase: %s\n" phrase)) | 1644 | (princ (format " Phrase: %s\n" phrase)) |
| 1645 | (princ (format " Macro key: %s\n" char)) | 1645 | (princ (format " Macro key: %s\n" char)) |
| @@ -1649,7 +1649,7 @@ this function repeatedly." | |||
| 1649 | (index-key | 1649 | (index-key |
| 1650 | (let ((iks index-keys) (cnt 0) ik) | 1650 | (let ((iks index-keys) (cnt 0) ik) |
| 1651 | (while (setq ik (pop iks)) | 1651 | (while (setq ik (pop iks)) |
| 1652 | (princ (format "Index entry %d: %s\n" (cl-incf cnt) ik))))) | 1652 | (princ (format "Index entry %d: %s\n" (incf cnt) ik))))) |
| 1653 | (repeat | 1653 | (repeat |
| 1654 | (princ (format " Index entry: %s\n" phrase))) | 1654 | (princ (format " Index entry: %s\n" phrase))) |
| 1655 | (t | 1655 | (t |
| @@ -1911,7 +1911,7 @@ both ends." | |||
| 1911 | (cond ((member char '(?y ?Y ?\ )) | 1911 | (cond ((member char '(?y ?Y ?\ )) |
| 1912 | ;; Yes! | 1912 | ;; Yes! |
| 1913 | (replace-match rpl t t) | 1913 | (replace-match rpl t t) |
| 1914 | (cl-incf replace-count) | 1914 | (incf replace-count) |
| 1915 | ;; See if we should insert newlines to shorten lines | 1915 | ;; See if we should insert newlines to shorten lines |
| 1916 | (and reftex-index-phrases-wrap-long-lines | 1916 | (and reftex-index-phrases-wrap-long-lines |
| 1917 | (reftex-index-phrases-fixup-line beg end)) | 1917 | (reftex-index-phrases-fixup-line beg end)) |
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index d66b0b9064e..0acf91ebe20 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el | |||
| @@ -629,7 +629,7 @@ if the information is exact (t) or approximate (nil)." | |||
| 629 | found) | 629 | found) |
| 630 | (save-excursion | 630 | (save-excursion |
| 631 | (while (not rtn) | 631 | (while (not rtn) |
| 632 | (cl-incf cnt) | 632 | (incf cnt) |
| 633 | (setq found (re-search-backward (reftex-everything-regexp) nil t)) | 633 | (setq found (re-search-backward (reftex-everything-regexp) nil t)) |
| 634 | (setq rtn | 634 | (setq rtn |
| 635 | (cond | 635 | (cond |
| @@ -693,7 +693,7 @@ if the information is exact (t) or approximate (nil)." | |||
| 693 | (when (and (eq (car (car list)) 'index) | 693 | (when (and (eq (car (car list)) 'index) |
| 694 | (string= (nth 2 index-info) | 694 | (string= (nth 2 index-info) |
| 695 | (nth 2 (car list)))) | 695 | (nth 2 (car list)))) |
| 696 | (cl-incf n) | 696 | (incf n) |
| 697 | (setq dist (abs (- (point) (nth 4 (car list))))) | 697 | (setq dist (abs (- (point) (nth 4 (car list))))) |
| 698 | (if (or (not last-dist) (< dist last-dist)) | 698 | (if (or (not last-dist) (< dist last-dist)) |
| 699 | (setq last-dist dist last (car list)))) | 699 | (setq last-dist dist last (car list)))) |
| @@ -875,8 +875,8 @@ considered an argument of macro \\macro." | |||
| 875 | (backward-sexp)) | 875 | (backward-sexp)) |
| 876 | t) | 876 | t) |
| 877 | (error nil))) | 877 | (error nil))) |
| 878 | (if (memq (following-char) '(?\( ?\[)) (cl-incf cnt-opt)) | 878 | (if (memq (following-char) '(?\( ?\[)) (incf cnt-opt)) |
| 879 | (cl-incf cnt)) | 879 | (incf cnt)) |
| 880 | (setq pos (point)) | 880 | (setq pos (point)) |
| 881 | (when (and (memq (following-char) '(?\[ ?\( ?\{)) | 881 | (when (and (memq (following-char) '(?\[ ?\( ?\{)) |
| 882 | (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t)) | 882 | (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t)) |
| @@ -1017,18 +1017,18 @@ OPT-ARGS is a list of argument numbers which are optional." | |||
| 1017 | (while (< cnt n) | 1017 | (while (< cnt n) |
| 1018 | (while (and (member cnt opt-args) | 1018 | (while (and (member cnt opt-args) |
| 1019 | (eq (following-char) ?\{)) | 1019 | (eq (following-char) ?\{)) |
| 1020 | (cl-incf cnt)) | 1020 | (incf cnt)) |
| 1021 | (when (< cnt n) | 1021 | (when (< cnt n) |
| 1022 | (unless (and (condition-case nil | 1022 | (unless (and (condition-case nil |
| 1023 | (or (forward-list 1) t) | 1023 | (or (forward-list 1) t) |
| 1024 | (error nil)) | 1024 | (error nil)) |
| 1025 | (reftex-move-to-next-arg) | 1025 | (reftex-move-to-next-arg) |
| 1026 | (cl-incf cnt)) | 1026 | (incf cnt)) |
| 1027 | (setq cnt 1000)))) | 1027 | (setq cnt 1000)))) |
| 1028 | 1028 | ||
| 1029 | (while (and (memq cnt opt-args) | 1029 | (while (and (memq cnt opt-args) |
| 1030 | (eq (following-char) ?\{)) | 1030 | (eq (following-char) ?\{)) |
| 1031 | (cl-incf cnt))) | 1031 | (incf cnt))) |
| 1032 | (if (and (= n cnt) | 1032 | (if (and (= n cnt) |
| 1033 | (> (skip-chars-forward "{[") 0)) | 1033 | (> (skip-chars-forward "{[") 0)) |
| 1034 | (reftex-context-substring) | 1034 | (reftex-context-substring) |
| @@ -1114,7 +1114,7 @@ When LEVEL is non-nil, increase section numbers on that level." | |||
| 1114 | (if (or (not partspecial) | 1114 | (if (or (not partspecial) |
| 1115 | (not (= idx 1))) | 1115 | (not (= idx 1))) |
| 1116 | (aset reftex-section-numbers idx 0)) | 1116 | (aset reftex-section-numbers idx 0)) |
| 1117 | (cl-incf idx)))) | 1117 | (incf idx)))) |
| 1118 | (if partspecial | 1118 | (if partspecial |
| 1119 | (setq string (concat "Part " (reftex-roman-number | 1119 | (setq string (concat "Part " (reftex-roman-number |
| 1120 | (aref reftex-section-numbers 0)))) | 1120 | (aref reftex-section-numbers 0)))) |
| @@ -1124,7 +1124,7 @@ When LEVEL is non-nil, increase section numbers on that level." | |||
| 1124 | (if (not (and partspecial (not (equal string "")))) | 1124 | (if (not (and partspecial (not (equal string "")))) |
| 1125 | (setq string (concat string (if (not (string= string "")) "." "") | 1125 | (setq string (concat string (if (not (string= string "")) "." "") |
| 1126 | (int-to-string n)))) | 1126 | (int-to-string n)))) |
| 1127 | (cl-incf idx)) | 1127 | (incf idx)) |
| 1128 | (save-match-data | 1128 | (save-match-data |
| 1129 | (if (string-match "\\`\\([@0]\\.\\)+" string) | 1129 | (if (string-match "\\`\\([@0]\\.\\)+" string) |
| 1130 | (setq string (replace-match "" nil nil string))) | 1130 | (setq string (replace-match "" nil nil string))) |
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 4a4c4df4c58..30e9968a8e5 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el | |||
| @@ -374,7 +374,7 @@ also applies `reftex-translate-to-ascii-function' to the string." | |||
| 374 | (sep (or separator ""))) | 374 | (sep (or separator ""))) |
| 375 | (while (assoc (concat label sep (int-to-string num)) | 375 | (while (assoc (concat label sep (int-to-string num)) |
| 376 | (symbol-value reftex-docstruct-symbol)) | 376 | (symbol-value reftex-docstruct-symbol)) |
| 377 | (cl-incf num)) | 377 | (incf num)) |
| 378 | (setcdr cell num) | 378 | (setcdr cell num) |
| 379 | (concat label sep (int-to-string num)))))) | 379 | (concat label sep (int-to-string num)))))) |
| 380 | 380 | ||
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 7286c214f7a..1f1c74550a5 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el | |||
| @@ -244,7 +244,7 @@ During a selection process, these are the local bindings. | |||
| 244 | ;; Walk the docstruct and insert the appropriate stuff | 244 | ;; Walk the docstruct and insert the appropriate stuff |
| 245 | (while (setq cell (pop all)) | 245 | (while (setq cell (pop all)) |
| 246 | 246 | ||
| 247 | (cl-incf index) | 247 | (incf index) |
| 248 | (setq from (point)) | 248 | (setq from (point)) |
| 249 | 249 | ||
| 250 | (cond | 250 | (cond |
| @@ -314,7 +314,7 @@ During a selection process, these are the local bindings. | |||
| 314 | (or show-commented (null comment))) | 314 | (or show-commented (null comment))) |
| 315 | 315 | ||
| 316 | ;; Yes we want this one | 316 | ;; Yes we want this one |
| 317 | (cl-incf cnt) | 317 | (incf cnt) |
| 318 | (setq prev-inserted cell) | 318 | (setq prev-inserted cell) |
| 319 | ; (if (eq offset 'attention) (setq offset cell)) | 319 | ; (if (eq offset 'attention) (setq offset cell)) |
| 320 | 320 | ||
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 54085f7f9e3..fda506a6d87 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -277,7 +277,7 @@ on the menu bar. | |||
| 277 | 277 | ||
| 278 | (defun reftex-next-multifile-index () | 278 | (defun reftex-next-multifile-index () |
| 279 | ;; Return the next free index for multifile symbols. | 279 | ;; Return the next free index for multifile symbols. |
| 280 | (cl-incf reftex-multifile-index)) | 280 | (incf reftex-multifile-index)) |
| 281 | 281 | ||
| 282 | (defun reftex-tie-multifile-symbols () | 282 | (defun reftex-tie-multifile-symbols () |
| 283 | "Tie the buffer-local symbols to globals connected with the master file. | 283 | "Tie the buffer-local symbols to globals connected with the master file. |
| @@ -937,7 +937,7 @@ This enforces rescanning the buffer on next use." | |||
| 937 | (not (member (aref fmt i) '(?%)))) | 937 | (not (member (aref fmt i) '(?%)))) |
| 938 | (setq word (concat word "\\|" (regexp-quote | 938 | (setq word (concat word "\\|" (regexp-quote |
| 939 | (substring fmt 0 (1+ i))))) | 939 | (substring fmt 0 (1+ i))))) |
| 940 | (cl-incf i)) | 940 | (incf i)) |
| 941 | (cons (concat word "\\)\\=") typekey)) | 941 | (cons (concat word "\\)\\=") typekey)) |
| 942 | (nreverse reftex-words-to-typekey-alist))) | 942 | (nreverse reftex-words-to-typekey-alist))) |
| 943 | 943 | ||
| @@ -990,7 +990,7 @@ This enforces rescanning the buffer on next use." | |||
| 990 | (mapconcat | 990 | (mapconcat |
| 991 | (lambda(x) | 991 | (lambda(x) |
| 992 | (format "[%c] %-20.20s%s" (car x) (nth 1 x) | 992 | (format "[%c] %-20.20s%s" (car x) (nth 1 x) |
| 993 | (if (= 0 (mod (cl-incf i) 3)) "\n" ""))) | 993 | (if (= 0 (mod (incf i) 3)) "\n" ""))) |
| 994 | reftex-key-to-index-macro-alist ""))) | 994 | reftex-key-to-index-macro-alist ""))) |
| 995 | 995 | ||
| 996 | ;; Make the full list of section levels | 996 | ;; Make the full list of section levels |
| @@ -1084,7 +1084,7 @@ This enforces rescanning the buffer on next use." | |||
| 1084 | (args (substring macro (match-beginning 0))) | 1084 | (args (substring macro (match-beginning 0))) |
| 1085 | opt-list nlabel (cnt 0)) | 1085 | opt-list nlabel (cnt 0)) |
| 1086 | (while (string-match "\\`[[{]\\(\\*\\)?[]}]" args) | 1086 | (while (string-match "\\`[[{]\\(\\*\\)?[]}]" args) |
| 1087 | (cl-incf cnt) | 1087 | (incf cnt) |
| 1088 | (when (eq ?\[ (string-to-char args)) | 1088 | (when (eq ?\[ (string-to-char args)) |
| 1089 | (push cnt opt-list)) | 1089 | (push cnt opt-list)) |
| 1090 | (when (and (match-end 1) | 1090 | (when (and (match-end 1) |
| @@ -1280,7 +1280,7 @@ Valid actions are: readable, restore, read, kill, write." | |||
| 1280 | "SELECT EXTERNAL DOCUMENT\n------------------------\n" | 1280 | "SELECT EXTERNAL DOCUMENT\n------------------------\n" |
| 1281 | (mapconcat | 1281 | (mapconcat |
| 1282 | (lambda (x) | 1282 | (lambda (x) |
| 1283 | (format fmt (cl-incf n) (or (car x) "") | 1283 | (format fmt (incf n) (or (car x) "") |
| 1284 | (abbreviate-file-name (cdr x)))) | 1284 | (abbreviate-file-name (cdr x)))) |
| 1285 | xr-alist "")) | 1285 | xr-alist "")) |
| 1286 | nil t)) | 1286 | nil t)) |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index ba4ff5cf7b6..1e3151dce03 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -2199,7 +2199,7 @@ Hierarchy is displayed in a temporary buffer." | |||
| 2199 | (rst-update-section hdr) | 2199 | (rst-update-section hdr) |
| 2200 | (goto-char (point-max)) | 2200 | (goto-char (point-max)) |
| 2201 | (insert "\n") | 2201 | (insert "\n") |
| 2202 | (cl-incf level)))))) | 2202 | (incf level)))))) |
| 2203 | 2203 | ||
| 2204 | (define-obsolete-function-alias 'rst-display-adornments-hierarchy | 2204 | (define-obsolete-function-alias 'rst-display-adornments-hierarchy |
| 2205 | #'rst-display-hdr-hierarchy "29.1") | 2205 | #'rst-display-hdr-hierarchy "29.1") |
| @@ -2752,7 +2752,7 @@ See `rst-toc-insert-tree' for STYLE, DEPTH and TGT-STN. See | |||
| 2752 | (or (rst-toc-insert-stn child buf style depth indent | 2752 | (or (rst-toc-insert-stn child buf style depth indent |
| 2753 | (concat numbering (format num-fmt count)) | 2753 | (concat numbering (format num-fmt count)) |
| 2754 | keymap tgt-stn) fnd)) | 2754 | keymap tgt-stn) fnd)) |
| 2755 | (cl-incf count)))) | 2755 | (incf count)))) |
| 2756 | 2756 | ||
| 2757 | ;; FIXME refactoring: Use `rst-Stn-buffer' instead of `buf'. | 2757 | ;; FIXME refactoring: Use `rst-Stn-buffer' instead of `buf'. |
| 2758 | (defun rst-toc-insert-stn (stn buf style depth indent numbering keymap tgt-stn) | 2758 | (defun rst-toc-insert-stn (stn buf style depth indent numbering keymap tgt-stn) |
| @@ -3466,7 +3466,7 @@ Otherwise return nil." | |||
| 3466 | (t ; Non-empty line in indented block. | 3466 | (t ; Non-empty line in indented block. |
| 3467 | (when (or broken in-sub in-super) | 3467 | (when (or broken in-sub in-super) |
| 3468 | (setq in-first t) | 3468 | (setq in-first t) |
| 3469 | (cl-incf count)) | 3469 | (incf count)) |
| 3470 | (setq in-sub nil) | 3470 | (setq in-sub nil) |
| 3471 | (setq in-super nil))) | 3471 | (setq in-super nil))) |
| 3472 | (save-excursion | 3472 | (save-excursion |
| @@ -3494,7 +3494,7 @@ do all lines instead of just paragraphs." | |||
| 3494 | (in-sub | 3494 | (in-sub |
| 3495 | (insert indent)) | 3495 | (insert indent)) |
| 3496 | ((or in-first all) | 3496 | ((or in-first all) |
| 3497 | (let ((tag (format "%d. " (cl-incf enum)))) | 3497 | (let ((tag (format "%d. " (incf enum)))) |
| 3498 | (setq indent (make-string (length tag) ? )) | 3498 | (setq indent (make-string (length tag) ? )) |
| 3499 | (insert tag))) | 3499 | (insert tag))) |
| 3500 | (t | 3500 | (t |
| @@ -3546,7 +3546,7 @@ Renumber as necessary. Region is from BEG to END." | |||
| 3546 | (goto-char marker) nil) | 3546 | (goto-char marker) nil) |
| 3547 | (looking-at (rst-re 'itmany-beg-1)) | 3547 | (looking-at (rst-re 'itmany-beg-1)) |
| 3548 | (replace-match (format "%d." count) nil nil nil 1) | 3548 | (replace-match (format "%d." count) nil nil nil 1) |
| 3549 | (cl-incf count)))))) | 3549 | (incf count)))))) |
| 3550 | 3550 | ||
| 3551 | (defun rst-line-block-region (beg end &optional with-empty) | 3551 | (defun rst-line-block-region (beg end &optional with-empty) |
| 3552 | "Add line block prefixes for a region. | 3552 | "Add line block prefixes for a region. |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 476ea3ec26f..0eb686ce35d 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1945,7 +1945,7 @@ Mark is left at original location." | |||
| 1945 | (if (not (eq (char-syntax (preceding-char)) ?/)) | 1945 | (if (not (eq (char-syntax (preceding-char)) ?/)) |
| 1946 | (progn | 1946 | (progn |
| 1947 | ;; Don't count single-char words. | 1947 | ;; Don't count single-char words. |
| 1948 | (unless (looking-at ".\\>") (cl-incf count)) | 1948 | (unless (looking-at ".\\>") (incf count)) |
| 1949 | (forward-char 1)) | 1949 | (forward-char 1)) |
| 1950 | (let ((cmd | 1950 | (let ((cmd |
| 1951 | (buffer-substring-no-properties | 1951 | (buffer-substring-no-properties |