(diary-face, holiday-face): Add dark-background variants.
[bpt/emacs.git] / lisp / diff.el
index 73b783a..358ad9a 100644 (file)
 
 (require 'compile)
 
-;;; This is duplicated in vc.el.
-(defvar diff-switches "-c"
-  "*A string or list of strings specifying switches to be be passed to diff.")
+(defgroup diff nil
+  "Comparing files with `diff'."
+  :group 'tools)
 
-(defvar diff-command "diff"
-  "*The command to use to run diff.")
+;;;###autoload
+(defcustom diff-switches "-c"
+  "*A string or list of strings specifying switches to be be passed to diff."
+  :type '(choice string (repeat string))
+  :group 'diff)
+
+;;;###autoload
+(defcustom diff-command "diff"
+  "*The command to use to run diff."
+  :type 'string
+  :group 'diff)
 
 (defvar diff-regexp-alist
   '(
@@ -152,11 +161,11 @@ is nil, REGEXP matches only half a section.")
              ;; We have found as many new loci as the user wants,
              ;; or the user wanted a specific diff, and we're past it.
          (setq found-desired t)))
-    (if found-desired
-       (setq compilation-parsing-end (point))
-      ;; Set to point-max, not point, so we don't perpetually
-      ;; parse the last bit of text when it isn't a diff header.
-      (setq compilation-parsing-end (point-max)))
+    (set-marker compilation-parsing-end
+               (if found-desired (point)
+                 ;; Set to point-max, not point, so we don't perpetually
+                 ;; parse the last bit of text when it isn't a diff header.
+                 (point-max)))
     (message "Parsing differences...done"))
   (setq compilation-error-list (nreverse compilation-error-list)))
 
@@ -296,11 +305,11 @@ The backup file is the first file given to `diff'."
              (base-versions (concat (file-name-sans-versions
                                      (file-name-nondirectory backupname))
                                     ".~"))
-             (bv-length (length base-versions)))
+             ;; This is a fluid var for backup-extract-version.
+             (backup-extract-version-start (length base-versions)))
         (concat dir
                 (car (sort
                       (file-name-all-completions base-versions dir)
-                      ;; bv-length is a fluid var for backup-extract-version:
                       (function
                        (lambda (fn1 fn2)
                          (> (backup-extract-version fn1)