Mercurial > emacs
changeset 57279:c8797551b3a0
(diff-file-header-re): Tighten up regexp a tiny bit.
(diff-fixup-modifs): Catch unified-diff file-headers.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 29 Sep 2004 17:42:50 +0000 |
parents | 4cec0243673a |
children | 28ddbb7dc58c |
files | lisp/ChangeLog lisp/diff-mode.el |
diffstat | 2 files changed, 19 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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>
--- 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))