1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

28 Commits

Author SHA1 Message Date
Miles Bader
55d5d71752 (diff-goto-source):
Update call to `diff-hunk-status-msg' to reflect new REV variable.
2000-10-04 21:31:40 +00:00
Stefan Monnier
a637334014 (diff-font-lock-keywords): Minor regex fix.
(diff-goto-source): Be smarter when choosing REVERSE or not.
2000-10-03 18:36:36 +00:00
Miles Bader
4eaa6852c9 (diff-test-hunk): Backout previous change. Fix doc string.
(diff-apply-hunk): Don't return a value.
2000-10-02 06:50:45 +00:00
Miles Bader
00df919ede (diff-goto-source): Emit a status message.
(diff-test-hunk, diff-apply-hunk): Remove unneeded `let'.
(diff-test-hunk): Make the return value agree with the doc string.
(diff-apply-hunk): Only advance if `diff-advance-after-apply-hunk'.
(diff-advance-after-apply-hunk): New variable.
2000-10-02 03:48:38 +00:00
Stefan Monnier
1b1b5daebc (diff-add-log-file-name): Remove.
(diff-mode): Use add-log-buffer-file-name-function.
2000-09-29 18:05:27 +00:00
Stefan Monnier
3cec9c5709 (diff-mode-map, diff-minor-mode-prefix):
Avoid user-reserved bindings.
(diff-mode, diff-minor-mode): Drop make-local-hook (done by add-hook).
(diff-header-face): Revert to grey85.
2000-09-29 02:25:32 +00:00
Stefan Monnier
6e4e8a3b59 (diff-hunk-text): Properly handle one-sided context diffs.
(diff-apply-hunk): When done, advance to the next hunk.
2000-09-21 16:52:30 +00:00
Stefan Monnier
370d860cb1 (diff-file-header-face): Reset to its previous value.
(diff-hunk-text): Correctly use offsets rather than buffer-positions.
(diff-xor): New function.
(diff-find-source-location): Use it.  Fix a stupid name clash.
(diff-hunk-status-msg): New function.
(diff-apply-hunk): Drop args OTHER-FILE, DRY-RUN, POPUP and NOERROR.
(diff-test-hunk): Use diff-find-source-location.
(diff-goto-source): Favor the `reverse'.
2000-09-21 16:15:32 +00:00
Stefan Monnier
281096ed46 * diff-mode.el (diff-add-log-file-name, diff-current-defun): New funs.
(diff-mode): Add support for add-log.el.
(diff-hunk-text): Use char offsets rather than line offsets.
(diff-find-source-location): Replace LINE with line-offset (nil
if not found) and always set POS to a meaningful position.
Adapt to the new char-offsets.
(diff-apply-hunk): Drop support for the unused `select' POPUP.
Adapt to the new diff-find-source-location.
(diff-goto-source): Adapt to the new diff-find-source-location.
2000-09-20 22:37:10 +00:00
Stefan Monnier
d868b3bdc3 (diff-find-source-location):
Move code from diff-apply-hunk.  Return buffer rather than file.
(diff-apply-hunk): Use the new result from  diff-find-source-location.
(diff-goto-source): Use the new diff-find-source-location.
2000-09-20 16:56:13 +00:00
Miles Bader
0415d0d076 (diff-apply-hunk): Jump to the correct line offset in the dry-run case. 2000-09-20 06:41:26 +00:00
Stefan Monnier
7b91e0f272 Moved closer to its users. 2000-09-19 16:25:43 +00:00
Stefan Monnier
c0aa75f75e Docstring fixes.
(diff-header-face, diff-comment-face): New faces.
(diff-font-lock-keywords): Highlight a bit differently.
(diff-find-source-location): Don't return SPAN any more.
(diff-hunk-text): Don't bother erasing the temp buffer.
(diff-find-text): Drop argument LINE.
(diff-apply-hunk): Update calls to diff-find-text.
(diff-goto-source): Use pop-to-buffer again and don't raise an error.
2000-09-19 16:24:30 +00:00
Miles Bader
6217eb5599 Doc fix. 2000-09-19 02:43:33 +00:00
Miles Bader
2b612b1f55 (diff-hunk-text):
Add new optional arg LINE-OFFSET, and return a cons if it's non-nil.
(diff-apply-hunk):
  Try to jump to the exact line in the source text corresponding to the
    position of point in the in the hunk.
2000-09-18 08:18:36 +00:00
Miles Bader
3017133f17 (diff-hunk-text): Use `with-temp-buffer'.
(diff-mode-map): Bind `diff-test-hunk'.
(diff-apply-hunk): Use `select-window' instead of `pop-to-buffer'.
2000-09-12 11:24:28 +00:00
Miles Bader
7530b6da4e (diff-apply-hunk): Function basically rewritten. Now understands
non-unified diffs.  Some functionality moved into `diff-hunk-text' and
  `diff-find-text'.  Add OTHER-FILE, DRY-RUN, POPUP, and NOERROR
  arguments.  If DRY-RUN is true, don't actually modify anything.  Only
  reposition point in the patched file if the patch succeeds.  Only pop
  up another window if POPUP is true.  Emit a message describing what
  happened if successful, and at what line-offset.  Automatically detect
  reversed hunks and do something appropriate.
(diff-hunk-text, diff-find-text): New functions.
(diff-filter-lines): Function removed.
(diff-test-hunk): New function.
(diff-goto-source): Rewritten in terms of diff-apply-hunk.
2000-09-11 13:51:21 +00:00
Dave Love
19e713d8c2 (diff-mouse-goto-source): New function. 2000-09-07 20:16:22 +00:00
Dave Love
ccce6558af (diff-mode) <defgroup>: Add :version.
(diff-mode-shared-map): Bind mouse-2.
(diff-imenu-generic-expression): New variable.
(diff-mode): Use it.
2000-08-29 14:38:49 +00:00
Stefan Monnier
027ac3f8db (diff-mode-map): Bind diff-apply-hunk.
(diff-find-source-location): New fun, extracted from diff-goto-source.
(diff-goto-source): Use it.
(diff-next-complex-hunk, diff-filter-lines): New function.
(diff-apply-hunk): New command.
2000-08-16 19:56:10 +00:00
Stefan Monnier
c0078a045c (diff-font-lock-keywords, diff-hunk-header-re)
(diff-goto-source, diff-unified->context, diff-context->unified)
(diff-reverse-direction, diff-fixup-modifs): Fix the regexps to
understand the format output by the `-p' argument to diff.
2000-06-05 07:30:09 +00:00
Stefan Monnier
0e104800ef (diff-font-lock-keywords): Recognize comments.
(diff-font-lock-defaults): Explicitly turn off multiline.
(diff-end-of-hunk): Handle comments and fix end-of-buffer bug.
(diff-ediff-patch): Fix call to ediff-patch-file.
(diff-end-of-file, diff-reverse-direction, diff-fixup-modifs):
Handle comments.
2000-05-10 22:12:46 +00:00
Stefan Monnier
d87e562753 (diff-mode-*-map): use `easy-mmode-defmap'.
(diff-end-of-hunk): Return the end position for use in
`easy-mmode-define-navigation'.
(diff-recenter): Remove.
(diff-(next|prev)-*): Rename `diff-*-(prev|next)' and defined in terms
of `easy-mmode-define-navigation'.
(diff-kill-*): Rename `diff-*-kill' (for consistency with the
previous renaming) and fix to use new names.
(diff-merge-strings): Use \n as separator: simpler, faster.
(diff-mode): Use `define-derived-mode'.
2000-03-21 16:59:17 +00:00
Stefan Monnier
fef8c55b16 (diff-kill-junk): New interactive function.
(diff-reverse-direction): Use delete-and-extract-region.
(diff-post-command-hook): Restrict the area so that the hook also works
outside of any diff hunk.  This is necessary for the minor-mode.
(diff-mode): Use toggle-read-only and minor-mode-overriding-map-alist.
(diff-minor-mode): Setup the hooks for header-hunk rewriting.
2000-02-07 02:01:07 +00:00
Stefan Monnier
0b82e382e3 * diff-mode.el (diff-mode-shared-map): fset'd and doc change.
(diff-minor-mode, diff-minor-mode-prefix, diff-minor-mode-map):
New code to support the minor mode version.
(diff-recenter): New function.
(diff-next-hunk, diff-next-file): Use it.
(diff-remembered-files-alist): New var.
(diff-merge-strings): New function.
(diff-find-file-name): Make it smarter and use the user's input more.
(diff-mode): Cosmetic changes.
1999-12-07 07:04:03 +00:00
Stefan Monnier
83b7b03b12 (diff-find-file-name): use `Index:' preferentially. 1999-10-13 22:26:45 +00:00
Stefan Monnier
9c610b03c4 (vc-backend-diff): get rid of the autoloaded advice. 1999-10-11 09:53:03 +00:00
Stefan Monnier
610a641856 Initial revision, known outside of Emacs as version 1.8. 1999-10-09 23:52:39 +00:00