diff options
| author | Glenn Morris | 2017-04-17 20:16:15 -0400 |
|---|---|---|
| committer | Glenn Morris | 2017-04-17 20:16:15 -0400 |
| commit | 2d42bf7f5e57001a836b7b4e6303fac9d3f00a1d (patch) | |
| tree | 4b8da28a02b175857c275a1d499f427242042fa5 | |
| parent | 2e3a33659fb85330ec76a67b2113472e7e0b546a (diff) | |
| download | emacs-2d42bf7f5e57001a836b7b4e6303fac9d3f00a1d.tar.gz emacs-2d42bf7f5e57001a836b7b4e6303fac9d3f00a1d.zip | |
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
| -rw-r--r-- | lisp/vc/ediff-diff.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-help.el | 4 | ||||
| -rw-r--r-- | lisp/vc/ediff-init.el | 6 | ||||
| -rw-r--r-- | lisp/vc/ediff-merg.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-mult.el | 26 | ||||
| -rw-r--r-- | lisp/vc/ediff-ptch.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-util.el | 30 | ||||
| -rw-r--r-- | lisp/vc/ediff-wind.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff.el | 84 |
9 files changed, 54 insertions, 104 deletions
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index ded82c41c9b..b957bdce4f7 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el | |||
| @@ -340,7 +340,7 @@ one optional arguments, diff-number to refine.") | |||
| 340 | (ediff-skip-unsuitable-frames) | 340 | (ediff-skip-unsuitable-frames) |
| 341 | (switch-to-buffer error-buf) | 341 | (switch-to-buffer error-buf) |
| 342 | (ediff-kill-buffer-carefully ctl-buf) | 342 | (ediff-kill-buffer-carefully ctl-buf) |
| 343 | (error "Errors in diff output. Diff output is in %S" diff-buff)))) | 343 | (user-error "Errors in diff output. Diff output is in %S" diff-buff)))) |
| 344 | 344 | ||
| 345 | ;; BOUNDS specifies visibility bounds to use. | 345 | ;; BOUNDS specifies visibility bounds to use. |
| 346 | ;; WORD-MODE tells whether we are in the word-mode or not. | 346 | ;; WORD-MODE tells whether we are in the word-mode or not. |
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 52a48252075..339d3a513b6 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el | |||
| @@ -190,7 +190,7 @@ the value of this variable and the variables `ediff-help-message-*' in | |||
| 190 | (overlays-at pos))))) | 190 | (overlays-at pos))))) |
| 191 | 191 | ||
| 192 | (if (not (stringp cmd)) | 192 | (if (not (stringp cmd)) |
| 193 | (error "Hmm... I don't see an Ediff command around here...")) | 193 | (user-error "Hmm... I don't see an Ediff command around here...")) |
| 194 | 194 | ||
| 195 | (ediff-documentation "Quick Help Commands") | 195 | (ediff-documentation "Quick Help Commands") |
| 196 | 196 | ||
| @@ -236,7 +236,7 @@ the value of this variable and the variables `ediff-help-message-*' in | |||
| 236 | ((string= cmd "s") (re-search-forward "^['`‘]s['’]")) | 236 | ((string= cmd "s") (re-search-forward "^['`‘]s['’]")) |
| 237 | ((string= cmd "+") (re-search-forward "^['`‘]\\+['’]")) | 237 | ((string= cmd "+") (re-search-forward "^['`‘]\\+['’]")) |
| 238 | ((string= cmd "=") (re-search-forward "^['`‘]=['’]")) | 238 | ((string= cmd "=") (re-search-forward "^['`‘]=['’]")) |
| 239 | (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) | 239 | (t (user-error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) |
| 240 | ) ; let case-fold-search | 240 | ) ; let case-fold-search |
| 241 | )) | 241 | )) |
| 242 | 242 | ||
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index e0542688593..59d97c3cea5 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el | |||
| @@ -385,8 +385,8 @@ It needs to be killed when we quit the session.") | |||
| 385 | 385 | ||
| 386 | (defsubst ediff-barf-if-not-control-buffer (&optional meta-buf-p) | 386 | (defsubst ediff-barf-if-not-control-buffer (&optional meta-buf-p) |
| 387 | (or (ediff-in-control-buffer-p meta-buf-p) | 387 | (or (ediff-in-control-buffer-p meta-buf-p) |
| 388 | (error "%S: This command runs in Ediff Control Buffer only!" | 388 | (user-error "%S: This command runs in Ediff Control Buffer only!" |
| 389 | this-command))) | 389 | this-command))) |
| 390 | 390 | ||
| 391 | (defgroup ediff-highlighting nil | 391 | (defgroup ediff-highlighting nil |
| 392 | "Highlighting of difference regions in Ediff." | 392 | "Highlighting of difference regions in Ediff." |
| @@ -758,7 +758,7 @@ TYPE-OF-EMACS is either `emacs' or `xemacs'." | |||
| 758 | (funcall op emacs-minor-version minor) | 758 | (funcall op emacs-minor-version minor) |
| 759 | t))) | 759 | t))) |
| 760 | (t | 760 | (t |
| 761 | (error "%S: Invalid op in ediff-check-version" op))))) | 761 | (user-error "%S: Invalid op in ediff-check-version" op))))) |
| 762 | 762 | ||
| 763 | (defun ediff-color-display-p () | 763 | (defun ediff-color-display-p () |
| 764 | (condition-case nil | 764 | (condition-case nil |
diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index d7fa74fff87..d91d04467e3 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el | |||
| @@ -281,7 +281,7 @@ With a prefix argument, returns window C to its normal size. | |||
| 281 | Used only for merging jobs." | 281 | Used only for merging jobs." |
| 282 | (interactive "P") | 282 | (interactive "P") |
| 283 | (if (not ediff-merge-job) | 283 | (if (not ediff-merge-job) |
| 284 | (error "ediff-shrink-window-C can be used only for merging jobs")) | 284 | (user-error "ediff-shrink-window-C can be used only for merging jobs")) |
| 285 | (cond ((eq arg '-) (setq arg -1)) | 285 | (cond ((eq arg '-) (setq arg -1)) |
| 286 | ((not (numberp arg)) (setq arg nil))) | 286 | ((not (numberp arg)) (setq arg nil))) |
| 287 | (cond ((null arg) | 287 | (cond ((null arg) |
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 41015f704df..5bf94a56351 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el | |||
| @@ -1242,7 +1242,7 @@ behavior." | |||
| 1242 | (insert "\n"))) | 1242 | (insert "\n"))) |
| 1243 | 1243 | ||
| 1244 | (defun ediff-draw-dir-diffs (diff-list &optional buf-name) | 1244 | (defun ediff-draw-dir-diffs (diff-list &optional buf-name) |
| 1245 | (if (null diff-list) (error "Lost difference info on these directories")) | 1245 | (if (null diff-list) (user-error "Lost difference info on these directories")) |
| 1246 | (setq buf-name | 1246 | (setq buf-name |
| 1247 | (or buf-name | 1247 | (or buf-name |
| 1248 | (ediff-unique-buffer-name "*Ediff File Group Differences" "*"))) | 1248 | (ediff-unique-buffer-name "*Ediff File Group Differences" "*"))) |
| @@ -1360,7 +1360,7 @@ Useful commands: | |||
| 1360 | "Display differences among the directories involved in session group." | 1360 | "Display differences among the directories involved in session group." |
| 1361 | (interactive) | 1361 | (interactive) |
| 1362 | (if (ediff-one-filegroup-metajob) | 1362 | (if (ediff-one-filegroup-metajob) |
| 1363 | (error "This command is inapplicable in the present context")) | 1363 | (user-error "This command is inapplicable in the present context")) |
| 1364 | (or (ediff-buffer-live-p ediff-dir-diffs-buffer) | 1364 | (or (ediff-buffer-live-p ediff-dir-diffs-buffer) |
| 1365 | (ediff-draw-dir-diffs ediff-dir-difference-list)) | 1365 | (ediff-draw-dir-diffs ediff-dir-difference-list)) |
| 1366 | (let ((buf ediff-dir-diffs-buffer)) | 1366 | (let ((buf ediff-dir-diffs-buffer)) |
| @@ -1441,7 +1441,7 @@ Useful commands: | |||
| 1441 | (if (ediff-buffer-live-p ediff-parent-meta-buffer) | 1441 | (if (ediff-buffer-live-p ediff-parent-meta-buffer) |
| 1442 | (ediff-show-meta-buffer | 1442 | (ediff-show-meta-buffer |
| 1443 | ediff-parent-meta-buffer ediff-meta-session-number) | 1443 | ediff-parent-meta-buffer ediff-meta-session-number) |
| 1444 | (error "This session group has no parent"))) | 1444 | (user-error "This session group has no parent"))) |
| 1445 | 1445 | ||
| 1446 | 1446 | ||
| 1447 | ;; argument is ignored | 1447 | ;; argument is ignored |
| @@ -1592,7 +1592,7 @@ Useful commands: | |||
| 1592 | (cond (ignore) | 1592 | (cond (ignore) |
| 1593 | (unmark (ediff-set-session-status info nil)) | 1593 | (unmark (ediff-set-session-status info nil)) |
| 1594 | ;;; (if (ediff-buffer-live-p session-buf) | 1594 | ;;; (if (ediff-buffer-live-p session-buf) |
| 1595 | ;;; (error "Can't hide active session, %s" (buffer-name session-buf))) | 1595 | ;;; (user-error "Can't hide active session, %s" (buffer-name session-buf))) |
| 1596 | (t (ediff-set-session-status info ?H)))) | 1596 | (t (ediff-set-session-status info ?H)))) |
| 1597 | unmark) | 1597 | unmark) |
| 1598 | 1598 | ||
| @@ -1707,7 +1707,7 @@ Useful commands: | |||
| 1707 | (setq custom-diff-buf ediff-custom-diff-buffer))))) | 1707 | (setq custom-diff-buf ediff-custom-diff-buffer))))) |
| 1708 | 1708 | ||
| 1709 | (or (ediff-buffer-live-p meta-diff-buff) | 1709 | (or (ediff-buffer-live-p meta-diff-buff) |
| 1710 | (error "Ediff: something wrong--killed multiple diff's buffer")) | 1710 | (user-error "Ediff: something wrong--killed multiple diff's buffer")) |
| 1711 | 1711 | ||
| 1712 | (cond ((ediff-buffer-live-p custom-diff-buf) | 1712 | (cond ((ediff-buffer-live-p custom-diff-buf) |
| 1713 | ;; for live session buffers we do them first because the user may | 1713 | ;; for live session buffers we do them first because the user may |
| @@ -1740,7 +1740,7 @@ Useful commands: | |||
| 1740 | (insert "\n"))) | 1740 | (insert "\n"))) |
| 1741 | (t | 1741 | (t |
| 1742 | (ediff-kill-buffer-carefully meta-diff-buff) | 1742 | (ediff-kill-buffer-carefully meta-diff-buff) |
| 1743 | (error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) | 1743 | (user-error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) |
| 1744 | )) | 1744 | )) |
| 1745 | 1745 | ||
| 1746 | (defun ediff-collect-custom-diffs () | 1746 | (defun ediff-collect-custom-diffs () |
| @@ -1792,7 +1792,7 @@ all marked sessions must be active." | |||
| 1792 | (goto-char (point-min)) | 1792 | (goto-char (point-min)) |
| 1793 | (display-buffer ediff-tmp-buffer 'not-this-window) | 1793 | (display-buffer ediff-tmp-buffer 'not-this-window) |
| 1794 | )) | 1794 | )) |
| 1795 | (error "The patch buffer wasn't found")))) | 1795 | (user-error "The patch buffer wasn't found")))) |
| 1796 | 1796 | ||
| 1797 | (declare-function ediff-directories-internal "ediff" | 1797 | (declare-function ediff-directories-internal "ediff" |
| 1798 | (dir1 dir2 dir3 regexp action jobname | 1798 | (dir1 dir2 dir3 regexp action jobname |
| @@ -1829,7 +1829,7 @@ all marked sessions must be active." | |||
| 1829 | (progn | 1829 | (progn |
| 1830 | (ediff-set-session-status info nil) | 1830 | (ediff-set-session-status info nil) |
| 1831 | (ediff-update-meta-buffer meta-buf nil session-number)) | 1831 | (ediff-update-meta-buffer meta-buf nil session-number)) |
| 1832 | (error "Aborted")))) | 1832 | (user-error "Aborted")))) |
| 1833 | 1833 | ||
| 1834 | (ediff-with-current-buffer meta-buf | 1834 | (ediff-with-current-buffer meta-buf |
| 1835 | (setq merge-autostore-dir | 1835 | (setq merge-autostore-dir |
| @@ -1927,7 +1927,7 @@ all marked sessions must be active." | |||
| 1927 | ;; level; see below | 1927 | ;; level; see below |
| 1928 | (setcar | 1928 | (setcar |
| 1929 | (quote ,info) ediff-control-buffer)))) | 1929 | (quote ,info) ediff-control-buffer)))) |
| 1930 | (error "Aborted"))) | 1930 | (user-error "Aborted"))) |
| 1931 | ((ediff-one-filegroup-metajob) ; needs 1 file arg | 1931 | ((ediff-one-filegroup-metajob) ; needs 1 file arg |
| 1932 | (funcall ediff-session-action-function | 1932 | (funcall ediff-session-action-function |
| 1933 | file1 | 1933 | file1 |
| @@ -2057,7 +2057,7 @@ all marked sessions must be active." | |||
| 2057 | 2057 | ||
| 2058 | (setq meta-buf (or meta-buf ediff-meta-buffer)) | 2058 | (setq meta-buf (or meta-buf ediff-meta-buffer)) |
| 2059 | (cond ((not (bufferp meta-buf)) | 2059 | (cond ((not (bufferp meta-buf)) |
| 2060 | (error "This Ediff session is not part of a session group")) | 2060 | (user-error "This Ediff session is not part of a session group")) |
| 2061 | ((not (ediff-buffer-live-p meta-buf)) | 2061 | ((not (ediff-buffer-live-p meta-buf)) |
| 2062 | (error | 2062 | (error |
| 2063 | "Can't find this session's group panel -- session itself is ok"))) | 2063 | "Can't find this session's group panel -- session itself is ok"))) |
| @@ -2127,7 +2127,7 @@ all marked sessions must be active." | |||
| 2127 | (interactive) | 2127 | (interactive) |
| 2128 | (ediff-update-registry) | 2128 | (ediff-update-registry) |
| 2129 | (if (not (ediff-buffer-live-p ediff-registry-buffer)) | 2129 | (if (not (ediff-buffer-live-p ediff-registry-buffer)) |
| 2130 | (error "No active Ediff sessions or corrupted session registry")) | 2130 | (user-error "No active Ediff sessions or corrupted session registry")) |
| 2131 | (let (wind frame) | 2131 | (let (wind frame) |
| 2132 | ;; for some reason, point moves in ediff-registry-buffer, so we preserve it | 2132 | ;; for some reason, point moves in ediff-registry-buffer, so we preserve it |
| 2133 | ;; explicitly | 2133 | ;; explicitly |
| @@ -2299,7 +2299,7 @@ If this is a session registry buffer then just bury it." | |||
| 2299 | (or result | 2299 | (or result |
| 2300 | (unless noerror | 2300 | (unless noerror |
| 2301 | (ediff-update-registry) | 2301 | (ediff-update-registry) |
| 2302 | (error "No session info in this line"))))) | 2302 | (user-error "No session info in this line"))))) |
| 2303 | 2303 | ||
| 2304 | 2304 | ||
| 2305 | (defun ediff-get-meta-overlay-at-pos (point) | 2305 | (defun ediff-get-meta-overlay-at-pos (point) |
| @@ -2380,7 +2380,7 @@ If this is a session registry buffer then just bury it." | |||
| 2380 | session-buf beg-marker end-marker) | 2380 | session-buf beg-marker end-marker) |
| 2381 | 2381 | ||
| 2382 | (if (or (file-directory-p file) (string-match "/dev/null" file)) | 2382 | (if (or (file-directory-p file) (string-match "/dev/null" file)) |
| 2383 | (error "`%s' is not an ordinary file" (file-name-as-directory file))) | 2383 | (user-error "`%s' is not an ordinary file" (file-name-as-directory file))) |
| 2384 | (setq session-buf (ediff-get-session-buffer info) | 2384 | (setq session-buf (ediff-get-session-buffer info) |
| 2385 | beg-marker (ediff-get-session-objB-name info) | 2385 | beg-marker (ediff-get-session-objB-name info) |
| 2386 | end-marker (ediff-get-session-objC-name info)) | 2386 | end-marker (ediff-get-session-objC-name info)) |
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 36aebf4aed1..0340672da2f 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el | |||
| @@ -766,7 +766,7 @@ you can still examine the changes via M-x ediff-files" | |||
| 766 | (select-window aux-wind) | 766 | (select-window aux-wind) |
| 767 | (goto-char (point-max)))) | 767 | (goto-char (point-max)))) |
| 768 | (switch-to-buffer-other-window patch-diagnostics) | 768 | (switch-to-buffer-other-window patch-diagnostics) |
| 769 | (error "Patch appears to have failed"))) | 769 | (user-error "Patch appears to have failed"))) |
| 770 | 770 | ||
| 771 | ;; If black magic is involved, apply patch to a temp copy of the | 771 | ;; If black magic is involved, apply patch to a temp copy of the |
| 772 | ;; file. Otherwise, apply patch to the orig copy. If patch is applied | 772 | ;; file. Otherwise, apply patch to the orig copy. If patch is applied |
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index aea5f76d4fc..bcf446a64ce 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el | |||
| @@ -939,7 +939,7 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting." | |||
| 939 | (interactive) | 939 | (interactive) |
| 940 | (ediff-barf-if-not-control-buffer) | 940 | (ediff-barf-if-not-control-buffer) |
| 941 | (if ediff-word-mode | 941 | (if ediff-word-mode |
| 942 | (error "No fine differences in this mode")) | 942 | (user-error "No fine differences in this mode")) |
| 943 | (cond ((eq ediff-auto-refine 'nix) | 943 | (cond ((eq ediff-auto-refine 'nix) |
| 944 | (setq ediff-auto-refine 'on) | 944 | (setq ediff-auto-refine 'on) |
| 945 | (ediff-make-fine-diffs ediff-current-difference 'noforce) | 945 | (ediff-make-fine-diffs ediff-current-difference 'noforce) |
| @@ -956,9 +956,9 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting." | |||
| 956 | (defun ediff--check-ancestor-exists () | 956 | (defun ediff--check-ancestor-exists () |
| 957 | (or (ediff-buffer-live-p ediff-ancestor-buffer) | 957 | (or (ediff-buffer-live-p ediff-ancestor-buffer) |
| 958 | (if ediff-merge-with-ancestor-job | 958 | (if ediff-merge-with-ancestor-job |
| 959 | (error "Lost connection to ancestor buffer. This shouldn't happen. \ | 959 | (user-error "Lost connection to ancestor buffer. This shouldn't happen. \ |
| 960 | Please report this bug to bug-gnu-emacs@gnu.org") | 960 | Please report this bug to bug-gnu-emacs@gnu.org") |
| 961 | (error "Not merging with ancestor")))) | 961 | (user-error "Not merging with ancestor")))) |
| 962 | 962 | ||
| 963 | ;; Restore `ediff-show-ancestor' on exit. | 963 | ;; Restore `ediff-show-ancestor' on exit. |
| 964 | (defun ediff--restore-options-on-exit () | 964 | (defun ediff--restore-options-on-exit () |
| @@ -1080,7 +1080,7 @@ of the current buffer." | |||
| 1080 | (save-window-excursion | 1080 | (save-window-excursion |
| 1081 | (select-window (ediff-get-visible-buffer-window buf)) | 1081 | (select-window (ediff-get-visible-buffer-window buf)) |
| 1082 | (command-execute toggle-ro-cmd))) | 1082 | (command-execute toggle-ro-cmd))) |
| 1083 | (error "Don't know how to toggle read-only in buffer %S" buf)) | 1083 | (user-error "Don't know how to toggle read-only in buffer %S" buf)) |
| 1084 | 1084 | ||
| 1085 | ;; Check if we made the current buffer updatable, but its file is RO. | 1085 | ;; Check if we made the current buffer updatable, but its file is RO. |
| 1086 | ;; Signal a warning in this case. | 1086 | ;; Signal a warning in this case. |
| @@ -1270,7 +1270,7 @@ This is especially useful when comparing buffers side-by-side." | |||
| 1270 | (interactive) | 1270 | (interactive) |
| 1271 | (ediff-barf-if-not-control-buffer) | 1271 | (ediff-barf-if-not-control-buffer) |
| 1272 | (or (ediff-window-display-p) | 1272 | (or (ediff-window-display-p) |
| 1273 | (error "%sEmacs is not running as a window application" | 1273 | (user-error "%sEmacs is not running as a window application" |
| 1274 | (if (featurep 'emacs) "" "X"))) | 1274 | (if (featurep 'emacs) "" "X"))) |
| 1275 | (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows | 1275 | (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows |
| 1276 | (let ((ctl-buf ediff-control-buffer)) | 1276 | (let ((ctl-buf ediff-control-buffer)) |
| @@ -1300,7 +1300,7 @@ which see." | |||
| 1300 | (interactive) | 1300 | (interactive) |
| 1301 | (let (window-setup-func) | 1301 | (let (window-setup-func) |
| 1302 | (or (ediff-window-display-p) | 1302 | (or (ediff-window-display-p) |
| 1303 | (error "%sEmacs is not running as a window application" | 1303 | (user-error "%sEmacs is not running as a window application" |
| 1304 | (if (featurep 'emacs) "" "X"))) | 1304 | (if (featurep 'emacs) "" "X"))) |
| 1305 | 1305 | ||
| 1306 | (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe) | 1306 | (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe) |
| @@ -1346,7 +1346,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." | |||
| 1346 | (if (featurep 'ediff-tbar) | 1346 | (if (featurep 'ediff-tbar) |
| 1347 | (progn | 1347 | (progn |
| 1348 | (or (ediff-window-display-p) | 1348 | (or (ediff-window-display-p) |
| 1349 | (error "%sEmacs is not running as a window application" | 1349 | (user-error "%sEmacs is not running as a window application" |
| 1350 | (if (featurep 'emacs) "" "X"))) | 1350 | (if (featurep 'emacs) "" "X"))) |
| 1351 | (if (ediff-use-toolbar-p) | 1351 | (if (ediff-use-toolbar-p) |
| 1352 | (ediff-kill-bottom-toolbar)) | 1352 | (ediff-kill-bottom-toolbar)) |
| @@ -1401,7 +1401,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." | |||
| 1401 | (interactive) | 1401 | (interactive) |
| 1402 | (ediff-barf-if-not-control-buffer) | 1402 | (ediff-barf-if-not-control-buffer) |
| 1403 | (if (not ediff-merge-with-ancestor-job) | 1403 | (if (not ediff-merge-with-ancestor-job) |
| 1404 | (error "This command makes sense only when merging with an ancestor")) | 1404 | (user-error "This command makes sense only when merging with an ancestor")) |
| 1405 | (setq ediff-show-clashes-only (not ediff-show-clashes-only)) | 1405 | (setq ediff-show-clashes-only (not ediff-show-clashes-only)) |
| 1406 | (if ediff-show-clashes-only | 1406 | (if ediff-show-clashes-only |
| 1407 | (message "Focus on regions where both buffers differ from the ancestor") | 1407 | (message "Focus on regions where both buffers differ from the ancestor") |
| @@ -1793,7 +1793,7 @@ With a prefix argument, go forward that many differences." | |||
| 1793 | (ediff-unselect-and-select-difference n) | 1793 | (ediff-unselect-and-select-difference n) |
| 1794 | ) ; let | 1794 | ) ; let |
| 1795 | (ediff-visible-region) | 1795 | (ediff-visible-region) |
| 1796 | (error "At end of the difference list"))) | 1796 | (user-error "At end of the difference list"))) |
| 1797 | 1797 | ||
| 1798 | (defun ediff-previous-difference (&optional arg) | 1798 | (defun ediff-previous-difference (&optional arg) |
| 1799 | "Go to the previous difference. | 1799 | "Go to the previous difference. |
| @@ -1842,7 +1842,7 @@ With a prefix argument, go back that many differences." | |||
| 1842 | (ediff-unselect-and-select-difference n) | 1842 | (ediff-unselect-and-select-difference n) |
| 1843 | ) ; let | 1843 | ) ; let |
| 1844 | (ediff-visible-region) | 1844 | (ediff-visible-region) |
| 1845 | (error "At beginning of the difference list"))) | 1845 | (user-error "At beginning of the difference list"))) |
| 1846 | 1846 | ||
| 1847 | ;; The diff number is as perceived by the user (i.e., 1+ the internal | 1847 | ;; The diff number is as perceived by the user (i.e., 1+ the internal |
| 1848 | ;; representation) | 1848 | ;; representation) |
| @@ -2161,7 +2161,7 @@ ARG is a prefix argument. If nil, copy the current difference region." | |||
| 2161 | (if (cdr saved-rec) | 2161 | (if (cdr saved-rec) |
| 2162 | (setq saved-diff (cdr saved-rec)) | 2162 | (setq saved-diff (cdr saved-rec)) |
| 2163 | (if (> ediff-number-of-differences 0) | 2163 | (if (> ediff-number-of-differences 0) |
| 2164 | (error "Nothing saved for diff %d in buffer %S" (1+ n) buf-type) | 2164 | (user-error "Nothing saved for diff %d in buffer %S" (1+ n) buf-type) |
| 2165 | (error ediff-NO-DIFFERENCES))) | 2165 | (error ediff-NO-DIFFERENCES))) |
| 2166 | 2166 | ||
| 2167 | (setq reg-beg (ediff-get-diff-posn buf-type 'beg n ediff-control-buffer)) | 2167 | (setq reg-beg (ediff-get-diff-posn buf-type 'beg n ediff-control-buffer)) |
| @@ -3200,7 +3200,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." | |||
| 3200 | (setq f (expand-file-name | 3200 | (setq f (expand-file-name |
| 3201 | (file-name-nondirectory default-file) f))) | 3201 | (file-name-nondirectory default-file) f))) |
| 3202 | (if (and no-dirs (file-directory-p f)) | 3202 | (if (and no-dirs (file-directory-p f)) |
| 3203 | (error "File %s is a directory" f)) | 3203 | (user-error "File %s is a directory" f)) |
| 3204 | f)) | 3204 | f)) |
| 3205 | 3205 | ||
| 3206 | ;; If PREFIX is given, then it is used as a prefix for the temp file | 3206 | ;; If PREFIX is given, then it is used as a prefix for the temp file |
| @@ -3307,7 +3307,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." | |||
| 3307 | (error | 3307 | (error |
| 3308 | (beep) | 3308 | (beep) |
| 3309 | (message "Couldn't save %s" buffer-file-name))) | 3309 | (message "Couldn't save %s" buffer-file-name))) |
| 3310 | (error "Buffer is out of sync for file %s" buffer-file-name)) | 3310 | (user-error "Buffer is out of sync for file %s" buffer-file-name)) |
| 3311 | ;; If buffer is not obsolete and is not modified, do nothing | 3311 | ;; If buffer is not obsolete and is not modified, do nothing |
| 3312 | nil) | 3312 | nil) |
| 3313 | ;; If buffer is obsolete, offer to revert | 3313 | ;; If buffer is obsolete, offer to revert |
| @@ -3320,7 +3320,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." | |||
| 3320 | (if file-magic | 3320 | (if file-magic |
| 3321 | (erase-buffer)) | 3321 | (erase-buffer)) |
| 3322 | (revert-buffer t t)) | 3322 | (revert-buffer t t)) |
| 3323 | (error "Buffer out of sync for file %s" buffer-file-name)))) | 3323 | (user-error "Buffer out of sync for file %s" buffer-file-name)))) |
| 3324 | 3324 | ||
| 3325 | ;; if there is another buffer visiting the file of the merge buffer, offer to | 3325 | ;; if there is another buffer visiting the file of the merge buffer, offer to |
| 3326 | ;; save and delete the buffer; else bark | 3326 | ;; save and delete the buffer; else bark |
| @@ -3375,7 +3375,7 @@ Without an argument, it saves customized diff argument, if available | |||
| 3375 | ediff-custom-diff-buffer) | 3375 | ediff-custom-diff-buffer) |
| 3376 | ((ediff-buffer-live-p ediff-diff-buffer) | 3376 | ((ediff-buffer-live-p ediff-diff-buffer) |
| 3377 | ediff-diff-buffer) | 3377 | ediff-diff-buffer) |
| 3378 | (t (error "Output from `diff' not found")))) | 3378 | (t (user-error "Output from `diff' not found")))) |
| 3379 | ) | 3379 | ) |
| 3380 | (let ((window-min-height 2)) | 3380 | (let ((window-min-height 2)) |
| 3381 | (save-buffer)))) | 3381 | (save-buffer)))) |
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 9b3d53fca76..31dcf3b69f9 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el | |||
| @@ -1184,7 +1184,7 @@ The frame to be resized is kept in `ediff-wide-display-frame'. | |||
| 1184 | This function modifies only the left margin and the width of the display. | 1184 | This function modifies only the left margin and the width of the display. |
| 1185 | It assumes that it is called from within the control buffer." | 1185 | It assumes that it is called from within the control buffer." |
| 1186 | (if (not (fboundp 'ediff-display-pixel-width)) | 1186 | (if (not (fboundp 'ediff-display-pixel-width)) |
| 1187 | (error "Can't determine display width")) | 1187 | (user-error "Can't determine display width")) |
| 1188 | (let* ((frame-A (window-frame ediff-window-A)) | 1188 | (let* ((frame-A (window-frame ediff-window-A)) |
| 1189 | (frame-A-params (frame-parameters frame-A)) | 1189 | (frame-A-params (frame-parameters frame-A)) |
| 1190 | (cw (ediff-frame-char-width frame-A)) | 1190 | (cw (ediff-frame-char-width frame-A)) |
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 07c5ceadc6c..4751bb6ddcb 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -289,9 +289,9 @@ deleted." | |||
| 289 | (file-magic (ediff-filename-magic-p file)) | 289 | (file-magic (ediff-filename-magic-p file)) |
| 290 | (temp-file-name-prefix (file-name-nondirectory file))) | 290 | (temp-file-name-prefix (file-name-nondirectory file))) |
| 291 | (cond ((not (file-readable-p file)) | 291 | (cond ((not (file-readable-p file)) |
| 292 | (error "File `%s' does not exist or is not readable" file)) | 292 | (user-error "File `%s' does not exist or is not readable" file)) |
| 293 | ((file-directory-p file) | 293 | ((file-directory-p file) |
| 294 | (error "File `%s' is a directory" file))) | 294 | (user-error "File `%s' is a directory" file))) |
| 295 | 295 | ||
| 296 | ;; some of the commands, below, require full file name | 296 | ;; some of the commands, below, require full file name |
| 297 | (setq file (expand-file-name file)) | 297 | (setq file (expand-file-name file)) |
| @@ -481,13 +481,13 @@ If this file is a backup, `ediff' it with its original." | |||
| 481 | (unwind-protect | 481 | (unwind-protect |
| 482 | (progn | 482 | (progn |
| 483 | (if (not (ediff-buffer-live-p buf-A)) | 483 | (if (not (ediff-buffer-live-p buf-A)) |
| 484 | (error "Buffer %S doesn't exist" buf-A)) | 484 | (user-error "Buffer %S doesn't exist" buf-A)) |
| 485 | (if (not (ediff-buffer-live-p buf-B)) | 485 | (if (not (ediff-buffer-live-p buf-B)) |
| 486 | (error "Buffer %S doesn't exist" buf-B)) | 486 | (user-error "Buffer %S doesn't exist" buf-B)) |
| 487 | (let ((ediff-job-name job-name)) | 487 | (let ((ediff-job-name job-name)) |
| 488 | (if (and ediff-3way-comparison-job | 488 | (if (and ediff-3way-comparison-job |
| 489 | (not buf-C-is-alive)) | 489 | (not buf-C-is-alive)) |
| 490 | (error "Buffer %S doesn't exist" buf-C))) | 490 | (user-error "Buffer %S doesn't exist" buf-C))) |
| 491 | (if (stringp buf-A-file-name) | 491 | (if (stringp buf-A-file-name) |
| 492 | (setq buf-A-file-name (file-name-nondirectory buf-A-file-name))) | 492 | (setq buf-A-file-name (file-name-nondirectory buf-A-file-name))) |
| 493 | (if (stringp buf-B-file-name) | 493 | (if (stringp buf-B-file-name) |
| @@ -784,13 +784,13 @@ names. Only the files that are under revision control are taken into account." | |||
| 784 | (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) | 784 | (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) |
| 785 | 785 | ||
| 786 | (cond ((string= dir1 dir2) | 786 | (cond ((string= dir1 dir2) |
| 787 | (error "Directories A and B are the same: %s" dir1)) | 787 | (user-error "Directories A and B are the same: %s" dir1)) |
| 788 | ((and (eq jobname 'ediff-directories3) | 788 | ((and (eq jobname 'ediff-directories3) |
| 789 | (string= dir1 dir3)) | 789 | (string= dir1 dir3)) |
| 790 | (error "Directories A and C are the same: %s" dir1)) | 790 | (user-error "Directories A and C are the same: %s" dir1)) |
| 791 | ((and (eq jobname 'ediff-directories3) | 791 | ((and (eq jobname 'ediff-directories3) |
| 792 | (string= dir2 dir3)) | 792 | (string= dir2 dir3)) |
| 793 | (error "Directories B and C are the same: %s" dir1))) | 793 | (user-error "Directories B and C are the same: %s" dir1))) |
| 794 | 794 | ||
| 795 | (if merge-autostore-dir | 795 | (if merge-autostore-dir |
| 796 | (or (stringp merge-autostore-dir) | 796 | (or (stringp merge-autostore-dir) |
| @@ -816,15 +816,15 @@ names. Only the files that are under revision control are taken into account." | |||
| 816 | (cond ((and (stringp dir1) (string= merge-autostore-dir dir1)) | 816 | (cond ((and (stringp dir1) (string= merge-autostore-dir dir1)) |
| 817 | (or (y-or-n-p | 817 | (or (y-or-n-p |
| 818 | "Directory for saving merged files = Directory A. Sure? ") | 818 | "Directory for saving merged files = Directory A. Sure? ") |
| 819 | (error "Directory merge aborted"))) | 819 | (user-error "Directory merge aborted"))) |
| 820 | ((and (stringp dir2) (string= merge-autostore-dir dir2)) | 820 | ((and (stringp dir2) (string= merge-autostore-dir dir2)) |
| 821 | (or (y-or-n-p | 821 | (or (y-or-n-p |
| 822 | "Directory for saving merged files = Directory B. Sure? ") | 822 | "Directory for saving merged files = Directory B. Sure? ") |
| 823 | (error "Directory merge aborted"))) | 823 | (user-error "Directory merge aborted"))) |
| 824 | ((and (stringp dir3) (string= merge-autostore-dir dir3)) | 824 | ((and (stringp dir3) (string= merge-autostore-dir dir3)) |
| 825 | (or (y-or-n-p | 825 | (or (y-or-n-p |
| 826 | "Directory for saving merged files = Ancestor Directory. Sure? ") | 826 | "Directory for saving merged files = Ancestor Directory. Sure? ") |
| 827 | (error "Directory merge aborted"))))) | 827 | (user-error "Directory merge aborted"))))) |
| 828 | 828 | ||
| 829 | (setq dir-diff-struct (ediff-intersect-directories | 829 | (setq dir-diff-struct (ediff-intersect-directories |
| 830 | jobname | 830 | jobname |
| @@ -877,7 +877,7 @@ names. Only the files that are under revision control are taken into account." | |||
| 877 | (string= merge-autostore-dir dir1)) | 877 | (string= merge-autostore-dir dir1)) |
| 878 | (or (y-or-n-p | 878 | (or (y-or-n-p |
| 879 | "Directory for saving merged file = directory A. Sure? ") | 879 | "Directory for saving merged file = directory A. Sure? ") |
| 880 | (error "Merge of directory revisions aborted"))) | 880 | (user-error "Merge of directory revisions aborted"))) |
| 881 | 881 | ||
| 882 | (setq file-list | 882 | (setq file-list |
| 883 | (ediff-get-directory-files-under-revision | 883 | (ediff-get-directory-files-under-revision |
| @@ -978,9 +978,9 @@ lines. For large regions, use `ediff-regions-linewise'." | |||
| 978 | (ediff-other-buffer bf)) | 978 | (ediff-other-buffer bf)) |
| 979 | t)))) | 979 | t)))) |
| 980 | (if (not (ediff-buffer-live-p buffer-A)) | 980 | (if (not (ediff-buffer-live-p buffer-A)) |
| 981 | (error "Buffer %S doesn't exist" buffer-A)) | 981 | (user-error "Buffer %S doesn't exist" buffer-A)) |
| 982 | (if (not (ediff-buffer-live-p buffer-B)) | 982 | (if (not (ediff-buffer-live-p buffer-B)) |
| 983 | (error "Buffer %S doesn't exist" buffer-B)) | 983 | (user-error "Buffer %S doesn't exist" buffer-B)) |
| 984 | 984 | ||
| 985 | 985 | ||
| 986 | (let ((buffer-A | 986 | (let ((buffer-A |
| @@ -1019,9 +1019,9 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1019 | (ediff-other-buffer bf)) | 1019 | (ediff-other-buffer bf)) |
| 1020 | t)))) | 1020 | t)))) |
| 1021 | (if (not (ediff-buffer-live-p buffer-A)) | 1021 | (if (not (ediff-buffer-live-p buffer-A)) |
| 1022 | (error "Buffer %S doesn't exist" buffer-A)) | 1022 | (user-error "Buffer %S doesn't exist" buffer-A)) |
| 1023 | (if (not (ediff-buffer-live-p buffer-B)) | 1023 | (if (not (ediff-buffer-live-p buffer-B)) |
| 1024 | (error "Buffer %S doesn't exist" buffer-B)) | 1024 | (user-error "Buffer %S doesn't exist" buffer-B)) |
| 1025 | 1025 | ||
| 1026 | (let ((buffer-A | 1026 | (let ((buffer-A |
| 1027 | (ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-")) | 1027 | (ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-")) |
| @@ -1467,7 +1467,7 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." | |||
| 1467 | (message "") ; kill the message from `locate-library' | 1467 | (message "") ; kill the message from `locate-library' |
| 1468 | (require ediff-version-control-package)) | 1468 | (require ediff-version-control-package)) |
| 1469 | (or silent | 1469 | (or silent |
| 1470 | (error "Version control package %S.el not found. Use vc.el instead" | 1470 | (user-error "Version control package %S.el not found. Use vc.el instead" |
| 1471 | ediff-version-control-package))))) | 1471 | ediff-version-control-package))))) |
| 1472 | 1472 | ||
| 1473 | 1473 | ||
| @@ -1512,56 +1512,6 @@ With optional NODE, goes to that node." | |||
| 1512 | (select-window ctl-window) | 1512 | (select-window ctl-window) |
| 1513 | (set-window-buffer ctl-window ctl-buf))))))) | 1513 | (set-window-buffer ctl-window ctl-buf))))))) |
| 1514 | 1514 | ||
| 1515 | |||
| 1516 | (dolist (mess '("^Errors in diff output. Diff output is in " | ||
| 1517 | "^Hmm... I don't see an Ediff command around here...$" | ||
| 1518 | "^Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer$" | ||
| 1519 | ": This command runs in Ediff Control Buffer only!$" | ||
| 1520 | ": Invalid op in ediff-check-version$" | ||
| 1521 | "^ediff-shrink-window-C can be used only for merging jobs$" | ||
| 1522 | "^Lost difference info on these directories$" | ||
| 1523 | "^This command is inapplicable in the present context$" | ||
| 1524 | "^This session group has no parent$" | ||
| 1525 | "^Can't hide active session, $" | ||
| 1526 | "^Ediff: something wrong--no multiple diffs buffer$" | ||
| 1527 | "^Can't make context diff for Session $" | ||
| 1528 | "^The patch buffer wasn't found$" | ||
| 1529 | "^Aborted$" | ||
| 1530 | "^This Ediff session is not part of a session group$" | ||
| 1531 | "^No active Ediff sessions or corrupted session registry$" | ||
| 1532 | "^No session info in this line$" | ||
| 1533 | "^`.*' is not an ordinary file$" | ||
| 1534 | "^Patch appears to have failed$" | ||
| 1535 | "^Recomputation of differences cancelled$" | ||
| 1536 | "^No fine differences in this mode$" | ||
| 1537 | "^Lost connection to ancestor buffer...sorry$" | ||
| 1538 | "^Not merging with ancestor$" | ||
| 1539 | "^Don't know how to toggle read-only in buffer " | ||
| 1540 | "Emacs is not running as a window application$" | ||
| 1541 | "^This command makes sense only when merging with an ancestor$" | ||
| 1542 | "^At end of the difference list$" | ||
| 1543 | "^At beginning of the difference list$" | ||
| 1544 | "^Nothing saved for diff .* in buffer " | ||
| 1545 | "^Buffer is out of sync for file " | ||
| 1546 | "^Buffer out of sync for file " | ||
| 1547 | "^Output from `diff' not found$" | ||
| 1548 | "^You forgot to specify a region in buffer " | ||
| 1549 | "^All right. Make up your mind and come back...$" | ||
| 1550 | "^Current buffer is not visiting any file$" | ||
| 1551 | "^Failed to retrieve revision: $" | ||
| 1552 | "^Can't determine display width.$" | ||
| 1553 | "^File `.*' does not exist or is not readable$" | ||
| 1554 | "^File `.*' is a directory$" | ||
| 1555 | "^Buffer .* doesn't exist$" | ||
| 1556 | "^Directories . and . are the same: " | ||
| 1557 | "^Directory merge aborted$" | ||
| 1558 | "^Merge of directory revisions aborted$" | ||
| 1559 | "^Buffer .* doesn't exist$" | ||
| 1560 | "^There is no file to merge$" | ||
| 1561 | "^Version control package .*.el not found. Use vc.el instead$")) | ||
| 1562 | (add-to-list 'debug-ignored-errors mess)) | ||
| 1563 | |||
| 1564 | |||
| 1565 | 1515 | ||
| 1566 | ;;; Command line interface | 1516 | ;;; Command line interface |
| 1567 | 1517 | ||