diff options
| author | Stefan Monnier | 2004-09-29 17:42:50 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-09-29 17:42:50 +0000 |
| commit | bd9d7d76f01d7f4df84e8a441029f211364d8292 (patch) | |
| tree | 107234b1848926916690f1e0de64b30260565629 | |
| parent | 0e9e9a2cc4ff7d30f55124427aafa07a36162416 (diff) | |
| download | emacs-bd9d7d76f01d7f4df84e8a441029f211364d8292.tar.gz emacs-bd9d7d76f01d7f4df84e8a441029f211364d8292.zip | |
(diff-file-header-re): Tighten up regexp a tiny bit.
(diff-fixup-modifs): Catch unified-diff file-headers.
| -rw-r--r-- | lisp/ChangeLog | 23 | ||||
| -rw-r--r-- | lisp/diff-mode.el | 9 |
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 @@ | |||
| 1 | 2004-09-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit. | ||
| 4 | (diff-fixup-modifs): Catch unified-diff file-headers. | ||
| 5 | |||
| 1 | 2004-09-28 Stefan <monnier@iro.umontreal.ca> | 6 | 2004-09-28 Stefan <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * dired.el (dired-view-command-alist): Use more efficient regexps. | 8 | * dired.el (dired-view-command-alist): Use more efficient regexps. |
| @@ -35,8 +40,8 @@ | |||
| 35 | (pr-version): New version number (6.8.1). | 40 | (pr-version): New version number (6.8.1). |
| 36 | (pr-ps-file-using-ghostscript): Use make-temp-file instead of | 41 | (pr-ps-file-using-ghostscript): Use make-temp-file instead of |
| 37 | make-temp-name. | 42 | make-temp-name. |
| 38 | (pr-delete-file): Check if file exists before deleting it. Reported by | 43 | (pr-delete-file): Check if file exists before deleting it. |
| 39 | Lennart Borgman <lennart.borgman.073@student.lu.se>. | 44 | Reported by Lennart Borgman <lennart.borgman.073@student.lu.se>. |
| 40 | 45 | ||
| 41 | 2004-09-26 Stefan <monnier@iro.umontreal.ca> | 46 | 2004-09-26 Stefan <monnier@iro.umontreal.ca> |
| 42 | 47 | ||
| @@ -48,21 +53,19 @@ | |||
| 48 | 2004-09-26 Dan Nicolaescu <dann@ics.uci.edu> | 53 | 2004-09-26 Dan Nicolaescu <dann@ics.uci.edu> |
| 49 | 54 | ||
| 50 | * term.el (term-ansi-at-eval-string, term-ansi-default-fg) | 55 | * term.el (term-ansi-at-eval-string, term-ansi-default-fg) |
| 51 | (term-ansi-default-bg, term-ansi-current-temp): Delete unused | 56 | (term-ansi-default-bg, term-ansi-current-temp): Delete unused vars. |
| 52 | vars. | ||
| 53 | (map): Bind S-prior, S-next and S-insert. | 57 | (map): Bind S-prior, S-next and S-insert. |
| 54 | (term-mode): Set `indent-tabs-mode' to nil. | 58 | (term-mode): Set `indent-tabs-mode' to nil. |
| 55 | (term-paste): New function to be bound to S-insert. | 59 | (term-paste): New function to be bound to S-insert. |
| 56 | (term-send-del, term-send-backspace): Change the strings sent. | 60 | (term-send-del, term-send-backspace): Change the strings sent. |
| 57 | (term-termcap-format): Synchronyze with etc/e/eterm.ti. | 61 | (term-termcap-format): Synchronyze with etc/e/eterm.ti. |
| 58 | (term-handle-colors-array): Fix handling of underline and reverse. | 62 | (term-handle-colors-array): Fix handling of underline and reverse. |
| 59 | (term-handle-ansi-escape): Do not handle smcup/rmcup. Add | 63 | (term-handle-ansi-escape): Do not handle smcup/rmcup. Add comments. |
| 60 | comments. | ||
| 61 | (term-erase-in-line): Fix comparison. | 64 | (term-erase-in-line): Fix comparison. |
| 62 | (term-emulate-terminal): Fix line wrap handling. | 65 | (term-emulate-terminal): Fix line wrap handling. |
| 63 | (term-start-output-log): Renamed from `term-set-output-log'. | 66 | (term-start-output-log): Rename from `term-set-output-log'. |
| 64 | (term-stop-output-log): Renamed from `term-stop-photo'. | 67 | (term-stop-output-log): Rename from `term-stop-photo'. |
| 65 | (term-switch-to-alternate-sub-buffer): Comment out, unused. | 68 | (term-switch-to-alternate-sub-buffer): Comment out, unused. |
| 66 | 69 | ||
| 67 | 2004-09-25 Stefan <monnier@iro.umontreal.ca> | 70 | 2004-09-25 Stefan <monnier@iro.umontreal.ca> |
| 68 | 71 | ||
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)." | |||
| 301 | ;;;; | 301 | ;;;; |
| 302 | 302 | ||
| 303 | (defconst diff-hunk-header-re "^\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|\\*\\{15\\}.*\n\\*\\*\\* .+ \\*\\*\\*\\*\\|[0-9]+\\(,[0-9]+\\)?[acd][0-9]+\\(,[0-9]+\\)?\\)$") | 303 | (defconst diff-hunk-header-re "^\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|\\*\\{15\\}.*\n\\*\\*\\* .+ \\*\\*\\*\\*\\|[0-9]+\\(,[0-9]+\\)?[acd][0-9]+\\(,[0-9]+\\)?\\)$") |
| 304 | (defconst diff-file-header-re (concat "^\\(--- .+\n\\+\\+\\+\\|\\*\\*\\* .+\n---\\|[^-+!<>0-9@* ]\\).+\n" (substring diff-hunk-header-re 1))) | 304 | (defconst diff-file-header-re (concat "^\\(--- .+\n\\+\\+\\+ \\|\\*\\*\\* .+\n--- \\|[^-+!<>0-9@* ]\\).+\n" (substring diff-hunk-header-re 1))) |
| 305 | (defvar diff-narrowed-to nil) | 305 | (defvar diff-narrowed-to nil) |
| 306 | 306 | ||
| 307 | (defun diff-end-of-hunk (&optional style) | 307 | (defun diff-end-of-hunk (&optional style) |
| @@ -798,9 +798,12 @@ else cover the whole bufer." | |||
| 798 | (goto-char end) (diff-end-of-hunk) | 798 | (goto-char end) (diff-end-of-hunk) |
| 799 | (let ((plus 0) (minus 0) (space 0) (bang 0)) | 799 | (let ((plus 0) (minus 0) (space 0) (bang 0)) |
| 800 | (while (and (= (forward-line -1) 0) (<= start (point))) | 800 | (while (and (= (forward-line -1) 0) (<= start (point))) |
| 801 | (if (not (looking-at "\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|[-*][-*][-*] .+ [-*][-*][-*][-*]\\)$")) | 801 | (if (not (looking-at |
| 802 | (concat "@@ -[0-9,]+ \\+[0-9,]+ @@" | ||
| 803 | "\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$" | ||
| 804 | "\\|--- .+\n\\+\\+\\+ "))) | ||
| 802 | (case (char-after) | 805 | (case (char-after) |
| 803 | (?\ (incf space)) | 806 | (?\s (incf space)) |
| 804 | (?+ (incf plus)) | 807 | (?+ (incf plus)) |
| 805 | (?- (incf minus)) | 808 | (?- (incf minus)) |
| 806 | (?! (incf bang)) | 809 | (?! (incf bang)) |