[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ediff-patch-file with wrong default buffer
From: |
Juri Linkov |
Subject: |
Re: Ediff-patch-file with wrong default buffer |
Date: |
Tue, 02 Feb 2010 02:33:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) |
> The GNU Diff manual defines the unified format which looks like this:
>
> --- FROM-FILE FROM-FILE-MODIFICATION-TIME
> +++ TO-FILE TO-FILE-MODIFICATION-TIME
Yet another problem with bzr and diff formats:
For Lisp files it's useful to set vc-bzr-diff-switches to "-F ^("
or diff --diff-options '-F ^(' aka `--show-function-line'
to show a function/variable name that precedes the hunk
(like "@@ (defvar ispell-message-text-end" in the patch below).
But in this case, with (add-hook 'message-send-hook 'ispell-message)
`ispell-message' checks the spelling of the whole patch that is annoying.
`ispell-message-text-end' defines the limit of spell-checking
for unidiff/context diff formats. But it is too strict.
This patch removes the final newline to allow more text after @@:
=== modified file 'lisp/textmodes/ispell.el'
--- lisp/textmodes/ispell.el 2010-01-14 18:59:31 +0000
+++ lisp/textmodes/ispell.el 2010-02-02 00:32:03 +0000
@@ -3459,7 +3459,7 @@ (defvar ispell-message-text-end
;; Matches context difference listing
"\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n---
.*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*"
;; Matches unidiff difference listing
- "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+
[-+][0-9]+,[0-9]+ @@\n"
+ "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+
[-+][0-9]+,[0-9]+ @@"
;; Matches reporter.el bug report
"^current state:\n==============\n"
;; Matches commonly used "cut" boundaries
--
Juri Linkov
http://www.jurta.org/emacs/