Commit 8dac9c34 authored by Stefan Monnier's avatar 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
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.
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment