diff options
| author | Alan Mackenzie | 2022-01-22 11:02:50 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2022-01-22 11:02:50 +0000 |
| commit | 14d64a8adcc866deecd758b898e8ef2d836b354a (patch) | |
| tree | 83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/vc | |
| parent | bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff) | |
| parent | ebe334cdc234de2897263aed4c05ac7088c11857 (diff) | |
| download | emacs-scratch/correct-warning-pos.tar.gz emacs-scratch/correct-warning-pos.zip | |
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/diff-mode.el | 33 | ||||
| -rw-r--r-- | lisp/vc/pcvs-info.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 15 |
3 files changed, 27 insertions, 23 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 37eaf254fdb..731d1e8256f 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -2272,21 +2272,24 @@ Return new point, if it was moved." | |||
| 2272 | "Iterate over all hunks between point and MAX. | 2272 | "Iterate over all hunks between point and MAX. |
| 2273 | Call FUN with two args (BEG and END) for each hunk." | 2273 | Call FUN with two args (BEG and END) for each hunk." |
| 2274 | (save-excursion | 2274 | (save-excursion |
| 2275 | (let* ((beg (or (ignore-errors (diff-beginning-of-hunk)) | 2275 | (catch 'malformed |
| 2276 | (ignore-errors (diff-hunk-next) (point)) | 2276 | (let* ((beg (or (ignore-errors (diff-beginning-of-hunk)) |
| 2277 | max))) | 2277 | (ignore-errors (diff-hunk-next) (point)) |
| 2278 | (while (< beg max) | 2278 | max))) |
| 2279 | (goto-char beg) | 2279 | (while (< beg max) |
| 2280 | (cl-assert (looking-at diff-hunk-header-re)) | 2280 | (goto-char beg) |
| 2281 | (let ((end | 2281 | (unless (looking-at diff-hunk-header-re) |
| 2282 | (save-excursion (diff-end-of-hunk) (point)))) | 2282 | (throw 'malformed nil)) |
| 2283 | (cl-assert (< beg end)) | 2283 | (let ((end |
| 2284 | (funcall fun beg end) | 2284 | (save-excursion (diff-end-of-hunk) (point)))) |
| 2285 | (goto-char end) | 2285 | (unless (< beg end) |
| 2286 | (setq beg (if (looking-at diff-hunk-header-re) | 2286 | (throw 'malformed nil)) |
| 2287 | end | 2287 | (funcall fun beg end) |
| 2288 | (or (ignore-errors (diff-hunk-next) (point)) | 2288 | (goto-char end) |
| 2289 | max)))))))) | 2289 | (setq beg (if (looking-at diff-hunk-header-re) |
| 2290 | end | ||
| 2291 | (or (ignore-errors (diff-hunk-next) (point)) | ||
| 2292 | max))))))))) | ||
| 2290 | 2293 | ||
| 2291 | (defun diff--font-lock-refined (max) | 2294 | (defun diff--font-lock-refined (max) |
| 2292 | "Apply hunk refinement from font-lock." | 2295 | "Apply hunk refinement from font-lock." |
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 341fa243cfa..b48a4a1cbf1 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el | |||
| @@ -130,7 +130,7 @@ to confuse some users sometimes." | |||
| 130 | (defvar cvs-bakprefix ".#" | 130 | (defvar cvs-bakprefix ".#" |
| 131 | "The prefix that CVS prepends to files when rcsmerge'ing.") | 131 | "The prefix that CVS prepends to files when rcsmerge'ing.") |
| 132 | 132 | ||
| 133 | (autoload 'cvs-mode-toggle-mark "pcvs") | 133 | (declare-function cvs-mode-toggle-mark "pcvs" (e)) |
| 134 | 134 | ||
| 135 | (defvar-keymap cvs-status-map | 135 | (defvar-keymap cvs-status-map |
| 136 | :doc "Local keymap for text properties of status." | 136 | :doc "Local keymap for text properties of status." |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index ef3354701c2..54457a21433 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1004,13 +1004,14 @@ responsible for the given file." | |||
| 1004 | ;; | 1004 | ;; |
| 1005 | ;; First try: find a responsible backend. If this is for registration, | 1005 | ;; First try: find a responsible backend. If this is for registration, |
| 1006 | ;; it must be a backend under which FILE is not yet registered. | 1006 | ;; it must be a backend under which FILE is not yet registered. |
| 1007 | (let ((dirs (delq nil | 1007 | (let* ((file (expand-file-name file)) |
| 1008 | (mapcar | 1008 | (dirs (delq nil |
| 1009 | (lambda (backend) | 1009 | (mapcar |
| 1010 | (when-let ((dir (vc-call-backend | 1010 | (lambda (backend) |
| 1011 | backend 'responsible-p file))) | 1011 | (when-let ((dir (vc-call-backend |
| 1012 | (cons backend dir))) | 1012 | backend 'responsible-p file))) |
| 1013 | vc-handled-backends)))) | 1013 | (cons backend dir))) |
| 1014 | vc-handled-backends)))) | ||
| 1014 | ;; Just a single response (or none); use it. | 1015 | ;; Just a single response (or none); use it. |
| 1015 | (if (< (length dirs) 2) | 1016 | (if (< (length dirs) 2) |
| 1016 | (caar dirs) | 1017 | (caar dirs) |