[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff-goto-source fails if "-p" is in diff-switches
From: |
Per Cederqvist |
Subject: |
diff-goto-source fails if "-p" is in diff-switches |
Date: |
Wed, 07 Feb 2007 15:12:51 +0100 |
Revision 1.94 of diff-mode.el (committed 2007-01-11) introduced a
regression. Now, the diff-goto-source function fails with either of
the error messages below if "-p" is present in diff-switches:
Unrecognized context diff first hunk header format
Unrecognized unified diff hunk header format
The enclosed patch makes diff-sanity-check-hunk less picky on the
format, so that diff-goto-sources starts working again even if
diff-switches is set to "-p" or "-up".
One way to reproduce the problem is to check out the Emacs source code
from CVS, edit emacs/src/abbrev.c, inserting a character in the
syms_of_abbrev function, saving the buffer, do M-x set-variable RET
diff-switches RET "-up" RET, do M-x vc-diff, move the cursor down to
the character you inserted, and press C-c C-c. Instead of jumping to
the same place in the source buffer, you will get the second error
message reported above.
/ceder
patch
Description: Teach diff-sanity-check-hunk to accept output from diff -u
- diff-goto-source fails if "-p" is in diff-switches,
Per Cederqvist <=