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
8dac9c34
Commit
8dac9c34
authored
Dec 01, 2014
by
Stefan Monnier
Browse files
* lisp/vc/diff-mode.el (diff-kill-applied-hunks): New command.
* lisp/vc/smerge-mode.el (smerge-swap): New command.
parent
581914e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
lisp/ChangeLog
lisp/ChangeLog
+10
-4
lisp/vc/diff-mode.el
lisp/vc/diff-mode.el
+10
-0
lisp/vc/smerge-mode.el
lisp/vc/smerge-mode.el
+13
-0
No files found.
lisp/ChangeLog
View file @
8dac9c34
2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/smerge-mode.el (smerge-swap): New command.
* vc/diff-mode.el (diff-kill-applied-hunks): New command.
2014-12-01 Ulf Jasper <ulf.jasper@web.de>
* net/newst-treeview.el (newsticker--treeview-item-show):
Check
window liveliness before measuring its width.
* net/newst-treeview.el (newsticker--treeview-item-show):
Check
window liveliness before measuring its width.
* net/newst-backend.el (newsticker--get-news-by-url-callback):
Pass correct status to `newsticker--sentinel-work'.
...
...
@@ -25,13 +31,13 @@
* vc/vc.el, vc/vc-cvs.el, vc/vc-rcs.el, vc/vc-svn.el: The 'merge'
backend method of RCS/CVS/SVN is now 'merge-file', to contrast with
'merge-branch'. Prompting for merge revisions is pushed down to
'merge-branch'.
Prompting for merge revisions is pushed down to
the back ends; this fixes a layering violation that caused bad
behavior with SVN.
* vc/vc.el, vc-hooks.el, and all backends: API simplification;
vc-stay-local-p and repository-hostname are no longer public
methods. Only the CVS and SVN backends used these, and the SVN
methods.
Only the CVS and SVN backends used these, and the SVN
support was conditioned out because svn status -v is too slow.
The CVS back end retains this machibery and the vc-stay-local
configuration variable now only affects it.
...
...
lisp/vc/diff-mode.el
View file @
8dac9c34
...
...
@@ -1817,6 +1817,16 @@ With a prefix argument, try to REVERSE the hunk."
(
diff-hunk-status-msg
line-offset
(
diff-xor
reverse
switched
)
t
)))
(
defun
diff-kill-applied-hunks
()
"Kill all hunks that have already been applied starting at point."
(
interactive
)
(
while
(
not
(
eobp
))
(
pcase-let
((
`
(
,
buf
,
line-offset
,
pos
,
src
,
_dst
,
switched
)
(
diff-find-source-location
nil
nil
)))
(
if
(
and
line-offset
switched
)
(
diff-hunk-kill
)
(
diff-hunk-next
)))))
(
defalias
'diff-mouse-goto-source
'diff-goto-source
)
(
defun
diff-goto-source
(
&optional
other-file
event
)
...
...
lisp/vc/smerge-mode.el
View file @
8dac9c34
...
...
@@ -1132,6 +1132,19 @@ repeating the command will highlight other two parts."
(
unless
smerge-use-changed-face
'
((
smerge
.
refine
)
(
face
.
smerge-refined-added
))))))
(
defun
smerge-swap
()
"Swap the \"Mine\" and the \"Other\" chunks.
Can be used before things like `smerge-keep-all' or `smerge-resolve' where the
ordering can have some subtle influence on the result, such as preferring the
spacing of the \"Other\" chunk."
(
interactive
)
(
smerge-match-conflict
)
(
goto-char
(
match-beginning
3
))
(
let
((
txt3
(
delete-and-extract-region
(
point
)
(
match-end
3
))))
(
insert
(
delete-and-extract-region
(
match-beginning
1
)
(
match-end
1
)))
(
goto-char
(
match-beginning
1
))
(
insert
txt3
)))
(
defun
smerge-diff
(
n1
n2
)
(
smerge-match-conflict
)
(
smerge-ensure-match
n1
)
...
...
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