summaryrefslogtreecommitdiff
path: root/lisp/diff.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff.el')
-rw-r--r--lisp/diff.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/diff.el b/lisp/diff.el
index 0c474672b70..d4c5f5d3a2e 100644
--- a/lisp/diff.el
+++ b/lisp/diff.el
@@ -196,9 +196,14 @@ With prefix arg, prompt for diff switches."
(let ((command
(mapconcat 'identity
(append '("diff")
- (if (consp diff-switches)
- diff-switches
- (list diff-switches))
+ ;; Use explicitly specified switches
+ (if switches
+ (if (consp switches)
+ switches (list switches))
+ ;; If not specified, use default.
+ (if (consp diff-switches)
+ diff-switches
+ (list diff-switches)))
(if (or old-alt new-alt)
(list "-L" old "-L" new))
(list (or old-alt old))