* lisp/vc/diff-mode.el (diff-count-matches):
(diff-fixup-modifs, diff-add-log-current-defuns):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* lisp/vc/vc-hooks.el (vc-insert-file):
* lisp/vc/vc.el (vc-print-log-setup-buttons, vc-prepare-patch):
Prefer incf to cl-incf.
(cherry picked from commit
e60103f130916a4632a108352360cb620c02e9f0)
(save-excursion
(let ((n 0))
(goto-char start)
- (while (re-search-forward re end t) (cl-incf n))
+ (while (re-search-forward re end t) (incf n))
n)))
(defun diff-splittable-p ()
"\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$"
"\\|--- .+\n\\+\\+\\+ ")))
(pcase (char-after)
- (?\s (cl-incf space))
- (?+ (cl-incf plus))
+ (?\s (incf space))
+ (?+ (incf plus))
(?- (unless ;; In git format-patch "^-- $" signifies
;; the end of the patch.
(and (eq diff-buffer-type 'git)
(looking-at "^-- $"))
- (cl-incf minus)))
- (?! (cl-incf bang))
+ (incf minus)))
+ (?! (incf bang))
((or ?\\ ?#) nil)
(?\n (if diff-valid-unified-empty-line
- (cl-incf space)
+ (incf space)
(setq space 0 plus 0 minus 0 bang 0)))
(_ (setq space 0 plus 0 minus 0 bang 0)))
(cond
(< (point) hunk-end))
(let ((patch-char (char-after)))
(pcase patch-char
- (?+ (cl-incf +lines))
- (?- (cl-incf -lines))
- (?\s (cl-incf =lines)))
+ (?+ (incf +lines))
+ (?- (incf -lines))
+ (?\s (incf =lines)))
(save-current-buffer
(funcall =ck-eodefun)
(funcall +ck-eodefun)
(cl-macrolet ((peek () '(and (< i n) (aref glob i))))
(while (< i n)
(setf c (aref glob i))
- (cl-incf i)
+ (incf i)
(cond ((not (memq c '(?* ?? ?\[ ?\{ ?\} ?, ?\\)))
(push (vc-hg--escape-for-pcre c) parts))
((eq c ?*)
(cond ((eq (peek) ?*)
- (cl-incf i)
+ (incf i)
(cond ((eq (peek) ?/)
- (cl-incf i)
+ (incf i)
(push "(?:.*/)?" parts))
(t
(push ".*" parts))))
((eq c ?\[)
(let ((j i))
(when (and (< j n) (memq (aref glob j) '(?! ?\])))
- (cl-incf j))
+ (incf j))
(while (and (< j n) (not (eq (aref glob j) ?\])))
- (cl-incf j))
+ (incf j))
(cond ((>= j n)
(push "\\[" parts))
(t
(push x parts)
(push ?\] parts))))))
((eq c ?\{)
- (cl-incf group)
+ (incf group)
(push "(?:" parts))
((eq c ?\})
(push ?\) parts)
((eq c ?\\)
(if (eq i n)
(push "\\\\" parts)
- (cl-incf i)
+ (incf i)
(push ?\\ parts)
(push c parts)))
(t
(let ((filepos 0))
(while
(and (< 0 (cadr (insert-file-contents
- file nil filepos (cl-incf filepos blocksize))))
+ file nil filepos (incf filepos blocksize))))
(progn (beginning-of-line)
(let ((pos (re-search-forward limit nil 'move)))
(when pos (delete-region (match-beginning 0)
(let ((entries 0))
(goto-char (point-min))
(while (re-search-forward log-view-message-re nil t)
- (cl-incf entries))
+ (incf entries))
(if (or (stringp limit)
(< entries limit))
;; The log has been printed in full. Perhaps it started
"text/x-patch"
patch-subject
"attachment"
- (format "%04d-%s" (cl-incf i) filename))))))
+ (format "%04d-%s" (incf i) filename))))))
(open-line 2)))))
(defun vc-default-responsible-p (_backend _file)