]> code.delx.au - gnu-emacs/commitdiff
(diff-find-source-location): Don't call
authorMartin Rudalics <rudalics@gmx.at>
Tue, 21 Apr 2009 06:56:51 +0000 (06:56 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 21 Apr 2009 06:56:51 +0000 (06:56 +0000)
diff-sanity-check-hunk when NOPROMPT is non-nil.  (Bug#3030)

lisp/ChangeLog
lisp/diff-mode.el

index 8130b30fa6f35d9d77c702800865db0b4ece6f97..d34ff6a24654bf807e9693b5a1c86063f0a98341 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-21  Martin Rudalics  <rudalics@gmx.at>
+
+       * diff-mode.el (diff-find-source-location): Don't call
+       diff-sanity-check-hunk when NOPROMPT is non-nil.  (Bug#3030)
+
 2009-04-21  Kenichi Handa  <handa@m17n.org>
 
        * international/uni-decomposition.el: Re-generated.
index a83200d8982835a0e27194c51a7d889bd6bf0abc..6242cda13c40d45b256dbe129e07fa5aaaac2c7d 100644 (file)
@@ -1575,7 +1575,9 @@ NOPROMPT, if non-nil, means not to prompt the user."
            ;; the user may disagree on what constitutes the hunk
            ;; (e.g. because an empty line truncates the hunk mid-course),
            ;; leading to potentially nasty surprises for the user.
-           (_ (diff-sanity-check-hunk))
+          ;;
+          ;; Suppress check when NOPROMPT is non-nil (Bug#3030).
+           (_ (unless noprompt (diff-sanity-check-hunk)))
           (hunk (buffer-substring
                   (point) (save-excursion (diff-end-of-hunk) (point))))
           (old (diff-hunk-text hunk reverse char-offset))