Function: ediff-jump-to-difference

ediff-jump-to-difference is an interactive and byte-compiled function defined in ediff-util.el.gz.

Signature

(ediff-jump-to-difference DIFFERENCE-NUMBER)

Documentation

Go to the difference specified as a prefix argument DIFFERENCE-NUMBER.

If the prefix argument is negative, count differences from the end.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff-util.el.gz
;; The diff number is as perceived by the user (i.e., 1+ the internal
;; representation)
(defun ediff-jump-to-difference (difference-number)
  "Go to the difference specified as a prefix argument DIFFERENCE-NUMBER.
If the prefix argument is negative, count differences from the
end."
  (interactive "p")
  (ediff-barf-if-not-control-buffer)
  (setq difference-number
	(cond ((< difference-number 0)
	       (+ ediff-number-of-differences difference-number))
	      ((> difference-number 0) (1- difference-number))
	      (t -1)))
  ;; -1 is allowed by ediff-unselect-and-select-difference --- it is the
  ;; position before the first one.
  (if (and (>= difference-number -1)
	   (<= difference-number ediff-number-of-differences))
      (ediff-unselect-and-select-difference difference-number)
    (error ediff-BAD-DIFF-NUMBER
	   this-command (1+ difference-number) ediff-number-of-differences)))