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
1c58b439
Commit
1c58b439
authored
Jan 08, 2008
by
Glenn Morris
Browse files
(diff-end-of-hunk): Don't match empty lines in unified format.
parent
0595c9f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/diff-mode.el
lisp/diff-mode.el
+6
-2
No files found.
lisp/ChangeLog
View file @
1c58b439
2008-01-08 Glenn Morris <rgm@gnu.org>
* diff-mode.el (diff-end-of-hunk): Don't match empty lines in
unified format.
* mouse.el (mouse-major-mode-menu): Suppress duplicate menus.
2008-01-08 Ralf Angeli <angeli@caeruleus.net>
...
...
lisp/diff-mode.el
View file @
1c58b439
;;; diff-mode.el --- a mode for viewing/editing context diffs
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; 2005, 2006, 2007
, 2008
Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: convenience patch diff
...
...
@@ -401,9 +401,13 @@ when editing big diffs)."
(
defun
diff-end-of-hunk
(
&optional
style
)
;; Especially important for unified (because headers are ambiguous).
(
setq
style
(
diff-hunk-style
style
))
;; 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