summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-09-29 17:42:50 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-09-29 17:42:50 +0000
commitbd9d7d76f01d7f4df84e8a441029f211364d8292 (patch)
tree107234b1848926916690f1e0de64b30260565629 /lisp
parent0e9e9a2cc4ff7d30f55124427aafa07a36162416 (diff)
downloademacs-bd9d7d76f01d7f4df84e8a441029f211364d8292.tar.gz
(diff-file-header-re): Tighten up regexp a tiny bit.
(diff-fixup-modifs): Catch unified-diff file-headers.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog23
-rw-r--r--lisp/diff-mode.el9
2 files changed, 19 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 187fc607c27..e01cd9f13a8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit.
+ (diff-fixup-modifs): Catch unified-diff file-headers.
+
2004-09-28 Stefan <monnier@iro.umontreal.ca>
* dired.el (dired-view-command-alist): Use more efficient regexps.
@@ -35,8 +40,8 @@
(pr-version): New version number (6.8.1).
(pr-ps-file-using-ghostscript): Use make-temp-file instead of
make-temp-name.
- (pr-delete-file): Check if file exists before deleting it. Reported by
- Lennart Borgman <lennart.borgman.073@student.lu.se>.
+ (pr-delete-file): Check if file exists before deleting it.
+ Reported by Lennart Borgman <lennart.borgman.073@student.lu.se>.
2004-09-26 Stefan <monnier@iro.umontreal.ca>
@@ -48,21 +53,19 @@
2004-09-26 Dan Nicolaescu <dann@ics.uci.edu>
* term.el (term-ansi-at-eval-string, term-ansi-default-fg)
- (term-ansi-default-bg, term-ansi-current-temp): Delete unused
- vars.
+ (term-ansi-default-bg, term-ansi-current-temp): Delete unused vars.
(map): Bind S-prior, S-next and S-insert.
(term-mode): Set `indent-tabs-mode' to nil.
(term-paste): New function to be bound to S-insert.
(term-send-del, term-send-backspace): Change the strings sent.
(term-termcap-format): Synchronyze with etc/e/eterm.ti.
(term-handle-colors-array): Fix handling of underline and reverse.
- (term-handle-ansi-escape): Do not handle smcup/rmcup. Add
- comments.
+ (term-handle-ansi-escape): Do not handle smcup/rmcup. Add comments.
(term-erase-in-line): Fix comparison.
- (term-emulate-terminal): Fix line wrap handling.
- (term-start-output-log): Renamed from `term-set-output-log'.
- (term-stop-output-log): Renamed from `term-stop-photo'.
- (term-switch-to-alternate-sub-buffer): Comment out, unused.
+ (term-emulate-terminal): Fix line wrap handling.
+ (term-start-output-log): Rename from `term-set-output-log'.
+ (term-stop-output-log): Rename from `term-stop-photo'.
+ (term-switch-to-alternate-sub-buffer): Comment out, unused.
2004-09-25 Stefan <monnier@iro.umontreal.ca>
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 21b1c6446e5..0a7f1a1950a 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -301,7 +301,7 @@ when editing big diffs)."
;;;;
(defconst diff-hunk-header-re "^\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|\\*\\{15\\}.*\n\\*\\*\\* .+ \\*\\*\\*\\*\\|[0-9]+\\(,[0-9]+\\)?[acd][0-9]+\\(,[0-9]+\\)?\\)$")
-(defconst diff-file-header-re (concat "^\\(--- .+\n\\+\\+\\+\\|\\*\\*\\* .+\n---\\|[^-+!<>0-9@* ]\\).+\n" (substring diff-hunk-header-re 1)))
+(defconst diff-file-header-re (concat "^\\(--- .+\n\\+\\+\\+ \\|\\*\\*\\* .+\n--- \\|[^-+!<>0-9@* ]\\).+\n" (substring diff-hunk-header-re 1)))
(defvar diff-narrowed-to nil)
(defun diff-end-of-hunk (&optional style)
@@ -798,9 +798,12 @@ else cover the whole bufer."
(goto-char end) (diff-end-of-hunk)
(let ((plus 0) (minus 0) (space 0) (bang 0))
(while (and (= (forward-line -1) 0) (<= start (point)))
- (if (not (looking-at "\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|[-*][-*][-*] .+ [-*][-*][-*][-*]\\)$"))
+ (if (not (looking-at
+ (concat "@@ -[0-9,]+ \\+[0-9,]+ @@"
+ "\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$"
+ "\\|--- .+\n\\+\\+\\+ ")))
(case (char-after)
- (?\ (incf space))
+ (?\s (incf space))
(?+ (incf plus))
(?- (incf minus))
(?! (incf bang))