* lisp/vc/ediff-init.el (ediff-shadow-overlay-priority): Remove variable.
(ediff-highest-priority): Remove function.
* lisp/vc/ediff-util.el (ediff-highlight-diff-in-one-buffer):
* lisp/vc/ediff-diff.el (ediff-set-diff-overlays-in-one-buffer)
(ediff-set-fine-diff-properties-in-one-buffer): Don't mess with
overlay priorities.
Fixes: debbugs:17234
+2014-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Ediff's overlay priorities cause more trouble than they solve.
+ * vc/ediff-init.el (ediff-shadow-overlay-priority): Remove variable.
+ (ediff-highest-priority): Remove function (bug#17234).
+ * vc/ediff-util.el (ediff-highlight-diff-in-one-buffer):
+ * vc/ediff-diff.el (ediff-set-diff-overlays-in-one-buffer)
+ (ediff-set-fine-diff-properties-in-one-buffer): Don't mess with
+ overlay priorities.
+
2014-04-10 Feng Li <fengli@gmail.com> (tiny change)
* progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
(setq pt-saved (ediff-with-current-buffer buff (point)))))
(setq overlay (ediff-make-bullet-proof-overlay begin end buff))
- (ediff-overlay-put overlay 'priority ediff-shadow-overlay-priority)
(ediff-overlay-put overlay 'ediff-diff-num current-diff)
(if (and (ediff-has-face-support-p)
ediff-use-faces ediff-highlight-all-diffs)
'default
(ediff-get-symbol-from-alist
buf-type ediff-fine-diff-face-alist)
- ))
- (priority (if default
- 0
- (1+ (or (ediff-overlay-get
- (symbol-value
- (ediff-get-symbol-from-alist
- buf-type
- ediff-current-diff-overlay-alist))
- 'priority)
- 0)))))
- (mapcar (lambda (overl)
- (ediff-set-overlay-face overl face)
- (ediff-overlay-put overl 'priority priority))
- fine-diff-vector)))
+ )))
+ (dolist (overl fine-diff-vector)
+ (ediff-set-overlay-face overl face))))
;; Set overlays over the regions that denote delimiters
(defun ediff-set-fine-overlays-for-combined-merge (diff-list reg-num)
;; List of difference overlays disturbed by working with the current diff.
(defvar ediff-disturbed-overlays nil "")
-;; Priority of non-selected overlays.
-(defvar ediff-shadow-overlay-priority 100 "")
-
(defcustom ediff-version-control-package 'vc
"Version control package used.
Currently, Ediff supports vc.el, rcs.el, pcl-cvs.el, and generic-sc.el. The
(ediff-defvar-local ediff-current-diff-overlay-Ancestor nil
"Overlay for the current difference region in the ancestor buffer.")
-;; Compute priority of a current ediff overlay.
-(defun ediff-highest-priority (start end buffer)
- (let ((pos (max 1 (1- start)))
- ovr-list)
- (if (featurep 'xemacs)
- (1+ ediff-shadow-overlay-priority)
- (ediff-with-current-buffer buffer
- (while (< pos (min (point-max) (1+ end)))
- (setq ovr-list (append (overlays-at pos) ovr-list))
- (setq pos (next-overlay-change pos)))
- (+ 1 ediff-shadow-overlay-priority
- (apply 'max
- (cons
- 1
- (mapcar
- (lambda (ovr)
- (if (and ovr
- ;; exclude ediff overlays from priority
- ;; calculation, or else priority will keep
- ;; increasing
- (null (ediff-overlay-get ovr 'ediff))
- (null (ediff-overlay-get ovr 'ediff-diff-num)))
- ;; use the overlay priority or 0
- (or (ediff-overlay-get ovr 'priority) 0)
- 0))
- ovr-list))))))))
-
-
(defvar ediff-toggle-read-only-function 'toggle-read-only
"Function to be used to toggle read-only status of the buffer.
If nil, Ediff tries using the command bound to C-x C-q.")
(if (featurep 'xemacs)
(ediff-move-overlay current-diff-overlay begin end-hilit)
(ediff-move-overlay current-diff-overlay begin end-hilit buff))
- (ediff-overlay-put current-diff-overlay 'priority
- (ediff-highest-priority begin end-hilit buff))
(ediff-overlay-put current-diff-overlay 'ediff-diff-num n)
;; unhighlight the background overlay for diff n so it won't