summaryrefslogtreecommitdiff
path: root/lisp/vc/ediff-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/ediff-init.el')
-rw-r--r--lisp/vc/ediff-init.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 806be855909..2de5e4dbdaf 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1743,8 +1743,10 @@ Unless optional argument INPLACE is non-nil, return a new string."
;; If ediff modified mode line, strip the modification
(defsubst ediff-strip-mode-line-format ()
- (if (member (car mode-line-format) '(" A: " " B: " " C: " " Ancestor: "))
- (setq mode-line-format (nth 2 mode-line-format))))
+ (and (consp mode-line-format)
+ (member (car mode-line-format)
+ '(" A: " " B: " " C: " " Ancestor: "))
+ (setq mode-line-format (nth 2 mode-line-format))))
;; Verify that we have a difference selected.
(defsubst ediff-valid-difference-p (&optional n)