Commit graph

184 commits

Author SHA1 Message Date
Andreas Schwab
165fd2df8c Fix last change 2011-05-16 14:29:35 +02:00
Chong Yidong
2d11b7b37c Backport fix for Bug#8672 from trunk 2011-05-15 10:12:51 -04:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Stefan Monnier
b1816a74de * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
empty lines without a leading space.
2010-12-07 14:48:15 -05:00
Chong Yidong
98cfec0d69 Backport VC improvements from trunk.
* vc/log-edit.el (log-edit-rewrite-fixes): New var.
(log-edit-author): New dynamic var.
(log-edit-changelog-ours-p, log-edit-insert-changelog-entries):
Use it to return the author if different from committer.
(log-edit-insert-changelog): Use them to add Author: and Fixes headers.

* vc/vc-hooks.el (vc-default-mode-line-string): Doc fix.

* vc/vc.el (vc-deduce-backend): New fun.  Handle diff buffers.
(vc-root-diff, vc-print-root-log, vc-log-incoming)
(vc-log-outgoing): Use it.
(vc-diff-internal): Set diff-vc-backend.

* vc/diff-mode.el (diff-vc-backend): New var.

* vc/vc.el (vc-diff-internal): Set `revert-buffer-function'
buffer-locally to lambda that re-runs the vc diff command.
(Bug#6447)

* vc/log-view.el (log-view-mode-map): Bind revert-buffer.

Make 'g' (AKA revert-buffer) rerun VC log, log-incoming and
log-outgoing commands.
* vc/vc.el (vc-log-internal-common): Add a new argument and use it
to create a buffer local revert-buffer-function variable.
(vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a
revert-buffer-function lambda.

Improve VC create/retrieve tag/branch.
* vc.el (vc-create-tag): Do not read the directory name for VCs
with repository revision granularity.  Adjust the tag/branch
prompt.  Reset VC properties.
(vc-retrieve-tag): Do not read the directory name for VCs
with repository revision granularity.  Reset VC properties.

Add optional support for resetting VC properties.
* vc-dispatcher.el (vc-resynch-window): Add new optional argument,
call vc-file-clearprops when true.
(vc-resynch-buffer): Add new optional argument, pass it down.
(vc-resynch-buffers-in-directory): Likewise.

Improve support for special markup in the VC commit message.
* vc-mtn.el (vc-mtn-checkin): Support Author: and Date: markup.
* vc-hg.el (vc-hg-checkin): Add support for Date:.
* vc-git.el (vc-git-checkin):
* vc-bzr.el (vc-bzr-checkin): Likewise.

Add support for vc-log-incoming, improve vc-log-outgoing for Git.
* vc-git.el (vc-git-log-view-mode): Fix font lock for
incoming/outgoing logs.
(vc-git-log-outgoing, vc-git-log-incoming): New functions.

* vc-git.el (vc-git-log-outgoing): Use the same format as the
short log.
(vc-git-log-incoming): Likewise.  Run "git fetch" before the log
command

Add bindings for vc-log-incoming and vc-log-outgoing.
* vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
and vc-log-outgoing.
* vc-dir.el (vc-dir-menu-map): Add menu bindings for vc-log-incoming
and vc-log-outgoing.

Improve state updating for VC tag commands.
* vc.el (vc-create-tag, vc-retrieve-tag): Call vc-resynch-buffer
to update the state of all buffers in the directory.

* vc-dir.el (vc-dir): Don't pop-up-windows.  (Bug#6204)

* vc.el (vc-checkin, vc-modify-change-comment):
Adjust to new vc-start/finish-logentry.
(vc-find-conflicted-file): New command.
(vc-transfer-file): Adjust to new vc-checkin.
(vc-next-action): Improve scoping.

* vc-git.el (vc-git-checkin): Use log-edit-extract-headers.
(vc-git-commits-coding-system): Rename from git-commits-coding-system.

* vc-dispatcher.el (vc-log-edit): Shorten names for
log-edit-show-files.

* vc-bzr.el (vc-bzr-checkin): Use log-edit-extract-headers.
(vc-bzr-conflicted-files): New function.

* log-edit.el (log-edit-summary, log-edit-header)
(log-edit-unknown-header): New faces.
(log-edit-headers-alist): New var.
(log-edit-header-contents-regexp): New const.
(log-edit-match-to-eoh): New function.
(log-edit-font-lock-keywords): Use them.
(log-edit): Insert a "Summary:" header as default.
(log-edit-mode): Mark font-lock rules as case-insensitive.
(log-edit-done): Cleanup headers.
(log-edit-extract-headers): New function to replace it.

* vc-dispatcher.el (vc-finish-logentry): Don't mess so badly with
the windows/frames.

* vc-bzr.el (vc-bzr-shelve-apply): Don't use *vc-bzr-shelve*.

* vc-dir.el (vc-dir-kill-line): New command.
(vc-dir-mode-map): Bind it to C-k.
(vc-dir-headers): Abbreviate the working dir.

* vc-git.el (vc-git-revision-table): Include remote branches.

New VC methods: vc-log-incoming and vc-log-outgoing.
* vc.el (vc-print-log-setup-buttons, vc-log-internal-common)
(vc-incoming-outgoing-internal, vc-log-incoming, vc-log-outgoing):
New functions.
(vc-print-log-internal): Just call vc-log-internal-common.
(vc-log-view-type): New permanent local variable.

* vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.

* vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.
(vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.

* vc-git.el (vc-git-log-outgoing): New function.
(vc-git-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.

* vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead of
the dynamic bound vc-short-log.  Highlight the tag.
(vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
(vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
(vc-hg-incoming-mode): Remove.
(vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.

Fix default-directory for vc-root-diff.
* vc.el (vc-root-diff): Bind default-directory to the root
directory for the diff command.

* vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
`vc-hg-command' with a list of flags.

* vc-bzr.el (vc-bzr-log-edit-mode): Add --fixes support to
log-edit-before-checkin-process.

* vc.el (vc-modify-change-comment): Pass MODE to vc-start-logentry.

* vc-bzr.el, vc-hg.el (log-edit-mode): Declare.

* vc-dispatcher.el (vc-start-logentry): Doc fix.
(log-view-process-buffer, log-edit-extra-flags): Declare.

Add special markup processing for commit logs.
* log-edit.el (log-edit): Add new argument MODE.  Use that mode
when non-nil instead of the log-view-mode.

* vc.el (vc-default-log-edit-mode): New function.

* vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to
log-edit.

Support for shelving snapshots and for showing shelves.
* vc-bzr.el (vc-bzr-shelve-show, vc-bzr-shelve-show-at-point)
(vc-bzr-shelve-apply-and-keep-at-point, vc-bzr-shelve-snapshot):
New functions.
(vc-bzr-shelve-map, vc-bzr-shelve-menu-map)
(vc-bzr-extra-menu-map): Map them.
2010-10-31 23:13:42 -04:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Stefan Monnier
4c5559bf39 (diff-add-change-log-entries-other-window): Document in the code a bug. 2009-10-28 19:30:25 +00:00
Stefan Monnier
cd8752523c (diff-hunk-kill): Fix the search of the next hunk (bug#4368). 2009-09-09 14:47:54 +00:00
Glenn Morris
c4f6e489aa Mark face aliases with "-face" suffix as obsolete. 2009-09-01 07:24:13 +00:00
Stefan Monnier
88421f3e11 (diff-find-source-location): Avoid goto-line. 2009-08-24 17:11:20 +00:00
Martin Rudalics
19a4c5043a Fix bug number in comment. 2009-04-21 07:19:01 +00:00
Martin Rudalics
5dadb083d4 (diff-find-source-location): Don't call
diff-sanity-check-hunk when NOPROMPT is non-nil.  (Bug#3030)
2009-04-21 06:56:51 +00:00
Chong Yidong
4c6de5a523 Fix last change to use bound-and-true-p. 2009-01-13 14:55:57 +00:00
Chong Yidong
28c6679241 (diff-mode-menu): Do not assume whitespace-mode is loaded. 2009-01-13 13:58:25 +00:00
Glenn Morris
e8f642e7ea (whitespace-style, whitespace-trailing-regexp): Silence compiler. 2009-01-11 03:23:56 +00:00
Dan Nicolaescu
ac7020b35e (diff-show-trailing-whitespaces): Remove function.
Move setting up whitepace-mode ...
(diff-mode): ... here.
(diff-mode-menu): Add a menu entry for showing trailing whitespace.
2009-01-10 17:21:04 +00:00
Stefan Monnier
4c282a2783 Remove spurious backspace. 2009-01-03 03:31:54 +00:00
Lute Kamstra
9201cc281b * align.el:
* allout.el:
* apropos.el:
* arc-mode.el:
* autoinsert.el:
* avoid.el:
* battery.el:
* bookmark.el:
* buff-menu.el:
* calculator.el:
* chistory.el:
* cmuscheme.el:
* comint.el:
* compare-w.el:
* dabbrev.el:
* delim-col.el:
* desktop.el:
* diff-mode.el:
* diff.el:
* dired-aux.el:
* dired-x.el:
* dired.el:
* dos-vars.el:
* ediff-diff.el:
* ediff-help.el:
* ediff-init.el:
* ediff-merg.el:
* ediff-mult.el:
* ediff-ptch.el:
* ediff-vers.el:
* ediff-wind.el:
* ediff.el:
* emerge.el:
* facemenu.el:
* faces.el:
* ffap.el:
* filecache.el:
* find-dired.el:
* font-core.el:
* font-lock.el:
* forms.el:
* fringe.el:
* help-at-pt.el:
* hippie-exp.el:
* ido.el:
* image-file.el:
* imenu.el:
* indent.el:
* info.el:
* isearchb.el:
* iswitchb.el:
* jit-lock.el:
* jka-compr.el:
* log-edit.el:
* lpr.el:
* ls-lisp.el:
* man.el:
* menu-bar.el:
* midnight.el:
* mouse-sel.el:
* mouse.el:
* msb.el:
* outline.el:
* paren.el:
* pcmpl-cvs.el:
* pcmpl-gnu.el:
* pcomplete.el:
* pcvs-info.el:
* pcvs-parse.el:
* printing.el:
* ps-mule.el:
* ps-print.el:
* replace.el:
* ruler-mode.el:
* saveplace.el:
* sb-image.el:
* scroll-bar.el:
* sha1.el:
* shadowfile.el:
* shell.el:
* sort.el:
* speedbar.el:
* strokes.el:
* tempo.el:
* term.el:
* terminal.el:
* time-stamp.el:
* time.el:
* tree-widget.el:
* type-break.el:
* vc-cvs.el:
* vc-hg.el:
* vc-mcvs.el:
* vc-rcs.el:
* vc-sccs.el:
* vc.el:
* view.el:
* w32-vars.el:
* whitespace.el:
* wid-edit.el: Remove leading * from docstrings of defcustoms,
deffaces, defconsts and defuns.
2008-12-03 05:48:14 +00:00
Stefan Monnier
68035b9764 (diff-find-file-name): Rename batch' to noprompt' and
be more honest when we don't know.
(diff-tell-file-name): Don't prompt before the actual prompt.
(diff-mode): Don't prompt in add-log-buffer-file-name-function.
(diff-find-source-location): Add `noprompt' argument.
(diff-current-defun): Don't prompt.
2008-09-14 21:16:30 +00:00
Dan Nicolaescu
d3cecb4041 (diff-show-trailing-whitespaces): Fix typo. 2008-08-06 03:50:13 +00:00
Vinicius Jose Latorre
5b8441bf47 Rename diff-show-trailing-blanks to diff-show-trailing-whitespaces. 2008-07-26 00:28:45 +00:00
Vinicius Jose Latorre
355b422fd2 New function diff-show-trailing-blanks in diff-mode.el. 2008-07-25 02:34:31 +00:00
Stefan Monnier
4542adfb1f (diff-auto-refine-mode): Remove lighter, since it's
otherwise displayed in every buffer.
2008-07-22 20:55:30 +00:00
Thien-Thi Nguyen
7381be9dcb Make auto-refining a minor mode, and diff- and smerge- use it.
* diff-mode.el (diff-auto-refine): Delete defcustom.
(diff-auto-refine-mode): New func/var via define-minor-mode.
Update var ref to use diff-auto-refine-mode.
* smerge-mode.el (diff-mode): Require when compiling.
(smerge-auto-refine): Delete defcustom.
Update smerge-auto-refine ref to use diff-auto-refine-mode.
2008-07-21 14:20:24 +00:00
Dan Nicolaescu
2a520399dc * add-log.el (add-change-log-entry): Add new arg to force each new
entry to be on a new line.
* diff-mode.el (diff-add-change-log-entries-other-window): Use it.
2008-06-24 04:04:48 +00:00
Stefan Monnier
bf6970a5f6 (diff-context-mid-hunk-header-re): New const.
(diff-font-lock-keywords, diff-context->unified)
(diff-reverse-direction, diff-fixup-modifs, diff-sanity-check-hunk)
(diff-hunk-text, diff-find-source-location): Use it.
(diff-post-command-hook): Let the user edit the hunk headers.
2008-05-26 17:25:44 +00:00
John Paul Wallington
337f393eb4 (diff-current-defun): Use `buffer-local-value'. 2008-05-15 01:22:40 +00:00
Stefan Monnier
365bdf633b (diff-hunk-header-re): Refine the regexp. 2008-05-11 21:57:27 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Miles Bader
341dd15a7b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1129
2008-04-26 05:40:19 +00:00
Stefan Monnier
43392d1263 (diff-hunk-header-re-unified): Allow elided line counts.
(diff-end-of-hunk, diff-unified->context, diff-fixup-modifs)
(diff-sanity-check-hunk): Adjust code accordingly.
2008-04-25 02:08:43 +00:00
Miles Bader
5bc6ddff00 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1107
2008-04-05 23:01:26 +00:00
Dan Nicolaescu
8d73b84e3b * diff-mode.el (diff-file-junk-re): Recognize the git format for
new files, deleted files and for changing permissions.
2008-04-05 00:56:31 +00:00
Dan Nicolaescu
2f745f7fa4 * diff-mode.el (diff-file-junk-re): Recognize the git format for
new files and for changing permissions.
2008-04-05 00:35:46 +00:00
Dan Nicolaescu
19446c41b1 (diff-file-junk-re): Recognize the git format for
new files.
(diff-mode): Set beginning-of-defun-function and
2008-04-04 22:34:35 +00:00
Stefan Monnier
adf4cc7e0a (diff-remembered-defdir): New var.
(diff-find-file-name): Use it to flush diff-remembered-files-alist.
2008-03-25 04:01:48 +00:00
Dan Nicolaescu
9f4e4f5bb9 (diff-header): Make the color louder.
(diff-refine-change): Tone the color down.
2008-03-19 04:59:34 +00:00
Stefan Monnier
aec1ef0729 (diff-end-of-hunk): Be careful not to overlook trailing
"+" lines not accounted for by counting "-" and context lines.
2008-03-18 20:49:52 +00:00
Dan Nicolaescu
5e15554dac (diff-refine-change): Adjust colors to be more visible. 2008-03-12 06:53:18 +00:00
Dan Nicolaescu
fb4dfdd28e (diff-mode-menu): Add :help. 2008-03-09 15:39:48 +00:00
Dan Nicolaescu
14cf0430e4 (diff-ignore-whitespace-hunk): Bind
inhibit-read-only before trying to change the buffer.
2008-03-08 07:56:13 +00:00
Miles Bader
51fb064bc7 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1090
2008-03-01 01:28:31 +00:00
Stefan Monnier
79fd616806 (diff-sanity-check-hunk): Only accept an empty line if
we still expect more lines.
2008-02-29 02:40:10 +00:00
Stefan Monnier
f52d2f9c30 * diff-mode.el (diff-file-junk-re): New const.
(diff-beginning-of-file-and-junk): Use it.
(diff-file-kill): Make sure we were really inside a file diff.

* diff-mode.el: Make it more robust in the presence of empty context
lines in unified hunks.
(diff-valid-unified-empty-line): New var.
(diff-unified->context, diff-sanity-check-hunk): Obey it.
(diff-end-of-hunk): Obey it.  New arg `donttrustheader'.
(diff-fixup-modifs, diff-post-command-hook): Use this new arg.
(diff-hunk-header-re-unified): New const.
(diff-font-lock-keywords, diff-hunk-header-re, diff-split-hunk)
(diff-fixup-modifs, diff-unified->context, diff-next-complex-hunk)
(diff-sanity-check-hunk): Use it.

* diff-mode.el (diff-beginning-of-file-and-junk): If we're on the
Index: line, don't search backward for the previous one.
2008-02-25 03:54:54 +00:00
Stefan Monnier
5f082d1fe6 (diff-file-junk-re): New const.
(diff-beginning-of-file-and-junk): Use it.
(diff-file-kill): Make sure we were really inside a file diff.
2008-02-19 21:31:20 +00:00
Stefan Monnier
95dfb89d87 Make it more robust in the presence of empty context lines in unified hunks.
(diff-valid-unified-empty-line): New var.
(diff-unified->context, diff-sanity-check-hunk): Obey it.
(diff-end-of-hunk): Obey it.  New arg `donttrustheader'.
(diff-fixup-modifs, diff-post-command-hook): Use this new arg.
(diff-hunk-header-re-unified): New const.
(diff-font-lock-keywords, diff-hunk-header-re, diff-split-hunk)
(diff-fixup-modifs, diff-unified->context, diff-next-complex-hunk)
(diff-sanity-check-hunk): Use it.
2008-02-19 19:44:48 +00:00
Dan Nicolaescu
40c02e0035 (diff-add-change-log-entries-other-window): Use
add-change-log-entry.
2008-02-10 18:38:05 +00:00
Stefan Monnier
f060b622fb (diff-beginning-of-file-and-junk): If we're on the
Index: line, don't search backward for the previous one.
2008-02-10 16:36:07 +00:00
Stefan Monnier
02e3336d0c (diff-add-change-log-entries-other-window): Avoid the
splitter in context hunks.
2008-02-08 16:00:55 +00:00
Stefan Monnier
8330c1755e (diff-add-change-log-entries-other-window):
Rename from diff-create-changelog.  Change users.
Minor change to hopefully work with plain diffs.
(diff-mode-map): Add binding for it.
2008-02-05 02:14:10 +00:00