# HG changeset patch # User Stefan Monnier # Date 1096479770 0 # Node ID c8797551b3a09be9794c30da0b214da266f94a37 # Parent 4cec0243673a1d16c2306303ffd2791dac1c8df0 (diff-file-header-re): Tighten up regexp a tiny bit. (diff-fixup-modifs): Catch unified-diff file-headers. diff -r 4cec0243673a -r c8797551b3a0 lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 29 14:23:21 2004 +0000 +++ b/lisp/ChangeLog Wed Sep 29 17:42:50 2004 +0000 @@ -1,3 +1,8 @@ +2004-09-29 Stefan Monnier + + * 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 * 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 . + (pr-delete-file): Check if file exists before deleting it. + Reported by Lennart Borgman . 2004-09-26 Stefan @@ -48,21 +53,19 @@ 2004-09-26 Dan Nicolaescu * 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 diff -r 4cec0243673a -r c8797551b3a0 lisp/diff-mode.el --- a/lisp/diff-mode.el Wed Sep 29 14:23:21 2004 +0000 +++ b/lisp/diff-mode.el Wed Sep 29 17:42:50 2004 +0000 @@ -301,7 +301,7 @@ ;;;; (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 @@ (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))