Mercurial > emacs
comparison lisp/diff.el @ 9736:093d80b4ae17
(diff-command): New variable.
(diff): Use it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 28 Oct 1994 18:45:45 +0000 |
parents | a4f0f421752e |
children | 4302535a19eb |
comparison
equal
deleted
inserted
replaced
9735:3f2c709d9856 | 9736:093d80b4ae17 |
---|---|
31 (require 'compile) | 31 (require 'compile) |
32 | 32 |
33 ;;; This is duplicated in vc.el. | 33 ;;; This is duplicated in vc.el. |
34 (defvar diff-switches "-c" | 34 (defvar diff-switches "-c" |
35 "*A string or list of strings specifying switches to be be passed to diff.") | 35 "*A string or list of strings specifying switches to be be passed to diff.") |
36 | |
37 (defvar diff-command "diff" | |
38 "*The command to use to run diff.") | |
36 | 39 |
37 (defvar diff-regexp-alist | 40 (defvar diff-regexp-alist |
38 '( | 41 '( |
39 ;; -u format: @@ -OLDSTART,OLDEND +NEWSTART,NEWEND @@ | 42 ;; -u format: @@ -OLDSTART,OLDEND +NEWSTART,NEWEND @@ |
40 ("^@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@$" 1 2) | 43 ("^@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@$" 1 2) |
194 (new-alt (file-local-copy new)) | 197 (new-alt (file-local-copy new)) |
195 buf) | 198 buf) |
196 (unwind-protect | 199 (unwind-protect |
197 (let ((command | 200 (let ((command |
198 (mapconcat 'identity | 201 (mapconcat 'identity |
199 (append '("diff") | 202 (append (list diff-command) |
200 ;; Use explicitly specified switches | 203 ;; Use explicitly specified switches |
201 (if switches | 204 (if switches |
202 (if (consp switches) | 205 (if (consp switches) |
203 switches (list switches)) | 206 switches (list switches)) |
204 ;; If not specified, use default. | 207 ;; If not specified, use default. |