* 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.
(cherry picked from commit
0eada9e1d30b9072cdc1bf8388205773cd23986f)
(push (min (max 0 (round number)) 255) result)
(goto-char (match-end 0))
(css--color-skip-blanks)
- (cl-incf iter)
+ (incf iter)
;; Accept a superset of the CSS syntax since I'm feeling lazy.
(when (and (= (skip-chars-forward ",/") 0)
(= iter 3))
;; The alpha is optional.
- (cl-incf iter))
+ (incf iter))
(css--color-skip-blanks)))
(when (looking-at ")")
(forward-char)
(if match
(progn
(put 'reftex-view-regexp-match :props newprop)
- (put 'reftex-view-regexp-match :cnt (cl-incf cnt))
+ (put 'reftex-view-regexp-match :cnt (incf cnt))
(reftex-highlight 0 (match-beginning highlight-group)
(match-end highlight-group))
(add-hook 'pre-command-hook #'reftex-highlight-shall-die)
(while dlist
(when (and (car (car dlist))
(cdr (car dlist)))
- (cl-incf cnt)
+ (incf cnt)
(insert (mapconcat #'identity (car dlist) "\n ") "\n"))
(pop dlist))
(goto-char (point-min))
(if (assoc label translate-alist)
(error "Duplicate label %s" label))
(setq new-label (concat (match-string 1 (car entry))
- (int-to-string (cl-incf (cdr nr-cell)))))
+ (int-to-string (incf (cdr nr-cell)))))
(push (cons label new-label) translate-alist)
(or (string= label new-label) (setq changed-sequence t))))
(error "Abort")))
(reftex-unhighlight 1)))
((and test cell)
- (cl-incf n))
+ (incf n))
((and (not test) cell)
;; Replace
(goto-char (match-beginning 1))
i -1
val nil)
(catch 'exit
- (while (and (< (cl-incf i) len) (null val))
+ (while (and (< (incf i) len) (null val))
(unless (assq (aref tag i) tag-alist)
(push (list (aref tag i)
tag
(concat (substring tag 0 i)
- "[" (substring tag i (cl-incf i)) "]"
+ "[" (substring tag i (incf i)) "]"
(substring tag i)))
tag-alist)
(throw 'exit t)))
- (push (list (+ ?0 (cl-incf cnt)) tag
+ (push (list (+ ?0 (incf cnt)) tag
(concat "[" (int-to-string cnt) "]:" tag))
tag-alist)))
(setq tag-alist (nreverse tag-alist))
(widen)
(goto-char (point-min))
(while (re-search-forward re1 nil t)
- (cl-incf ntimes1))
+ (incf ntimes1))
(goto-char (point-min))
(while (re-search-forward re2 nil t)
(push (cons (count-lines 1 (point)) (match-string 1)) superphrases)
- (cl-incf ntimes2))))
+ (incf ntimes2))))
(save-current-buffer
(while (setq file (pop files))
(setq buf (reftex-get-file-buffer-force file))
(let ((case-fold-search reftex-index-phrases-case-fold-search))
(while (re-search-forward re nil t)
(or (reftex-in-comment)
- (cl-incf nmatches)))))))))
+ (incf nmatches)))))))))
(with-output-to-temp-buffer "*Help*"
(princ (format " Phrase: %s\n" phrase))
(princ (format " Macro key: %s\n" char))
(index-key
(let ((iks index-keys) (cnt 0) ik)
(while (setq ik (pop iks))
- (princ (format "Index entry %d: %s\n" (cl-incf cnt) ik)))))
+ (princ (format "Index entry %d: %s\n" (incf cnt) ik)))))
(repeat
(princ (format " Index entry: %s\n" phrase)))
(t
(cond ((member char '(?y ?Y ?\ ))
;; Yes!
(replace-match rpl t t)
- (cl-incf replace-count)
+ (incf replace-count)
;; See if we should insert newlines to shorten lines
(and reftex-index-phrases-wrap-long-lines
(reftex-index-phrases-fixup-line beg end))
found)
(save-excursion
(while (not rtn)
- (cl-incf cnt)
+ (incf cnt)
(setq found (re-search-backward (reftex-everything-regexp) nil t))
(setq rtn
(cond
(when (and (eq (car (car list)) 'index)
(string= (nth 2 index-info)
(nth 2 (car list))))
- (cl-incf n)
+ (incf n)
(setq dist (abs (- (point) (nth 4 (car list)))))
(if (or (not last-dist) (< dist last-dist))
(setq last-dist dist last (car list))))
(backward-sexp))
t)
(error nil)))
- (if (memq (following-char) '(?\( ?\[)) (cl-incf cnt-opt))
- (cl-incf cnt))
+ (if (memq (following-char) '(?\( ?\[)) (incf cnt-opt))
+ (incf cnt))
(setq pos (point))
(when (and (memq (following-char) '(?\[ ?\( ?\{))
(re-search-backward "\\\\[*a-zA-Z]+\\=" nil t))
(while (< cnt n)
(while (and (member cnt opt-args)
(eq (following-char) ?\{))
- (cl-incf cnt))
+ (incf cnt))
(when (< cnt n)
(unless (and (condition-case nil
(or (forward-list 1) t)
(error nil))
(reftex-move-to-next-arg)
- (cl-incf cnt))
+ (incf cnt))
(setq cnt 1000))))
(while (and (memq cnt opt-args)
(eq (following-char) ?\{))
- (cl-incf cnt)))
+ (incf cnt)))
(if (and (= n cnt)
(> (skip-chars-forward "{[") 0))
(reftex-context-substring)
(if (or (not partspecial)
(not (= idx 1)))
(aset reftex-section-numbers idx 0))
- (cl-incf idx))))
+ (incf idx))))
(if partspecial
(setq string (concat "Part " (reftex-roman-number
(aref reftex-section-numbers 0))))
(if (not (and partspecial (not (equal string ""))))
(setq string (concat string (if (not (string= string "")) "." "")
(int-to-string n))))
- (cl-incf idx))
+ (incf idx))
(save-match-data
(if (string-match "\\`\\([@0]\\.\\)+" string)
(setq string (replace-match "" nil nil string)))
(sep (or separator "")))
(while (assoc (concat label sep (int-to-string num))
(symbol-value reftex-docstruct-symbol))
- (cl-incf num))
+ (incf num))
(setcdr cell num)
(concat label sep (int-to-string num))))))
;; Walk the docstruct and insert the appropriate stuff
(while (setq cell (pop all))
- (cl-incf index)
+ (incf index)
(setq from (point))
(cond
(or show-commented (null comment)))
;; Yes we want this one
- (cl-incf cnt)
+ (incf cnt)
(setq prev-inserted cell)
; (if (eq offset 'attention) (setq offset cell))
(defun reftex-next-multifile-index ()
;; Return the next free index for multifile symbols.
- (cl-incf reftex-multifile-index))
+ (incf reftex-multifile-index))
(defun reftex-tie-multifile-symbols ()
"Tie the buffer-local symbols to globals connected with the master file.
(not (member (aref fmt i) '(?%))))
(setq word (concat word "\\|" (regexp-quote
(substring fmt 0 (1+ i)))))
- (cl-incf i))
+ (incf i))
(cons (concat word "\\)\\=") typekey))
(nreverse reftex-words-to-typekey-alist)))
(mapconcat
(lambda(x)
(format "[%c] %-20.20s%s" (car x) (nth 1 x)
- (if (= 0 (mod (cl-incf i) 3)) "\n" "")))
+ (if (= 0 (mod (incf i) 3)) "\n" "")))
reftex-key-to-index-macro-alist "")))
;; Make the full list of section levels
(args (substring macro (match-beginning 0)))
opt-list nlabel (cnt 0))
(while (string-match "\\`[[{]\\(\\*\\)?[]}]" args)
- (cl-incf cnt)
+ (incf cnt)
(when (eq ?\[ (string-to-char args))
(push cnt opt-list))
(when (and (match-end 1)
"SELECT EXTERNAL DOCUMENT\n------------------------\n"
(mapconcat
(lambda (x)
- (format fmt (cl-incf n) (or (car x) "")
+ (format fmt (incf n) (or (car x) "")
(abbreviate-file-name (cdr x))))
xr-alist ""))
nil t))
(rst-update-section hdr)
(goto-char (point-max))
(insert "\n")
- (cl-incf level))))))
+ (incf level))))))
(define-obsolete-function-alias 'rst-display-adornments-hierarchy
#'rst-display-hdr-hierarchy "29.1")
(or (rst-toc-insert-stn child buf style depth indent
(concat numbering (format num-fmt count))
keymap tgt-stn) fnd))
- (cl-incf count))))
+ (incf count))))
;; FIXME refactoring: Use `rst-Stn-buffer' instead of `buf'.
(defun rst-toc-insert-stn (stn buf style depth indent numbering keymap tgt-stn)
(t ; Non-empty line in indented block.
(when (or broken in-sub in-super)
(setq in-first t)
- (cl-incf count))
+ (incf count))
(setq in-sub nil)
(setq in-super nil)))
(save-excursion
(in-sub
(insert indent))
((or in-first all)
- (let ((tag (format "%d. " (cl-incf enum))))
+ (let ((tag (format "%d. " (incf enum))))
(setq indent (make-string (length tag) ? ))
(insert tag)))
(t
(goto-char marker) nil)
(looking-at (rst-re 'itmany-beg-1))
(replace-match (format "%d." count) nil nil nil 1)
- (cl-incf count))))))
+ (incf count))))))
(defun rst-line-block-region (beg end &optional with-empty)
"Add line block prefixes for a region.
(if (not (eq (char-syntax (preceding-char)) ?/))
(progn
;; Don't count single-char words.
- (unless (looking-at ".\\>") (cl-incf count))
+ (unless (looking-at ".\\>") (incf count))
(forward-char 1))
(let ((cmd
(buffer-substring-no-properties