Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1c6aa2f5
Commit
1c6aa2f5
authored
Jan 08, 2008
by
Glenn Morris
Browse files
(diff-end-of-hunk): Don't match empty lines in unified format.
parent
d1050c69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lisp/diff-mode.el
lisp/diff-mode.el
+5
-1
No files found.
lisp/diff-mode.el
View file @
1c6aa2f5
...
...
@@ -391,9 +391,13 @@ when editing big diffs)."
;; Especially important for unified (because headers are ambiguous).
(
setq
style
(
cdr
(
assq
(
char-after
)
'
((
?@
.
unified
)
(
?*
.
context
))))))
(
goto-char
(
match-end
0
)))
;; Some versions of diff replace all-blank context lines in unified
;; format with empty lines. The use of \n below avoids matching such
;; lines as headers.
;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html
(
let
((
end
(
and
(
re-search-forward
(
case
style
;; A `unified' header is ambiguous.
(
unified
(
concat
"^[^-+# \\]\\|"
(
unified
(
concat
"^[^-+# \\
\n
]\\|"
diff-file-header-re
))
(
context
"^[^-+#! \\]"
)
(
normal
"^[^<>#\\]"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment