summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* (diff-header-face, diff-file-header-face)Eli Zaretskii2000-10-181-9/+15
| | | | | | (diff-changed-face): Add bold and italic attributes to tty faces. (diff-function-face): New face. (diff-font-lock-keywords): Use it.
* (diff-header-face, diff-file-header-face):Stefan Monnier2000-10-171-7/+15
| | | | | | Add specific setting for dark background. (diff-context-face): Renamed from diff-comment-face. Set explicitly rather than inheriting from font-lock-comment-face.
* (diff-header-face, diff-file-header-face)Eli Zaretskii2000-10-171-5/+17
| | | | (diff-changed-face): Define tty-specific colors.
* (diff-find-file-name): Fix regexp.Stefan Monnier2000-10-151-2/+2
|
* (diff-goto-source):Miles Bader2000-10-041-2/+2
| | | | Update call to `diff-hunk-status-msg' to reflect new REV variable.
* (diff-font-lock-keywords): Minor regex fix.Stefan Monnier2000-10-031-12/+11
| | | | (diff-goto-source): Be smarter when choosing REVERSE or not.
* (diff-test-hunk): Backout previous change. Fix doc string.Miles Bader2000-10-021-26/+17
| | | | (diff-apply-hunk): Don't return a value.
* (diff-goto-source): Emit a status message.Miles Bader2000-10-021-8/+17
| | | | | | | (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.
* (diff-add-log-file-name): Remove.Stefan Monnier2000-09-291-9/+4
| | | | (diff-mode): Use add-log-buffer-file-name-function.
* (diff-mode-map, diff-minor-mode-prefix):Stefan Monnier2000-09-291-16/+13
| | | | | | Avoid user-reserved bindings. (diff-mode, diff-minor-mode): Drop make-local-hook (done by add-hook). (diff-header-face): Revert to grey85.
* (diff-hunk-text): Properly handle one-sided context diffs.Stefan Monnier2000-09-211-72/+79
| | | | (diff-apply-hunk): When done, advance to the next hunk.
* (diff-file-header-face): Reset to its previous value.Stefan Monnier2000-09-211-111/+93
| | | | | | | | | | (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'.
* * diff-mode.el (diff-add-log-file-name, diff-current-defun): New funs.Stefan Monnier2000-09-201-59/+66
| | | | | | | | | | | (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.
* (diff-find-source-location):Stefan Monnier2000-09-201-49/+42
| | | | | | 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.
* (diff-apply-hunk): Jump to the correct line offset in the dry-run case.Miles Bader2000-09-201-2/+2
|
* Moved closer to its users.Stefan Monnier2000-09-191-22/+22
|
* Docstring fixes.Stefan Monnier2000-09-191-52/+51
| | | | | | | | | | (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.
* Doc fix.Miles Bader2000-09-191-3/+3
|
* (diff-hunk-text):Miles Bader2000-09-181-91/+112
| | | | | | | 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.
* (diff-hunk-text): Use `with-temp-buffer'.Miles Bader2000-09-121-8/+8
| | | | | (diff-mode-map): Bind `diff-test-hunk'. (diff-apply-hunk): Use `select-window' instead of `pop-to-buffer'.
* (diff-apply-hunk): Function basically rewritten. Now understandsMiles Bader2000-09-111-59/+210
| | | | | | | | | | | | | | 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.
* (diff-mouse-goto-source): New function.Dave Love2000-09-071-6/+28
|
* (diff-mode) <defgroup>: Add :version.Dave Love2000-08-291-4/+13
| | | | | | (diff-mode-shared-map): Bind mouse-2. (diff-imenu-generic-expression): New variable. (diff-mode): Use it.
* (diff-mode-map): Bind diff-apply-hunk.Stefan Monnier2000-08-161-89/+130
| | | | | | | (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.
* (diff-font-lock-keywords, diff-hunk-header-re)Stefan Monnier2000-06-051-10/+23
| | | | | | (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.
* (diff-font-lock-keywords): Recognize comments.Stefan Monnier2000-05-101-27/+44
| | | | | | | | (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.
* (diff-mode-*-map): use `easy-mmode-defmap'.Stefan Monnier2000-03-211-95/+43
| | | | | | | | | | | | (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'.
* (diff-kill-junk): New interactive function.Stefan Monnier2000-02-071-18/+53
| | | | | | | | (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.
* * diff-mode.el (diff-mode-shared-map): fset'd and doc change.Stefan Monnier1999-12-071-33/+93
| | | | | | | | | | | (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.
* (diff-find-file-name): use `Index:' preferentially.Stefan Monnier1999-10-131-4/+6
|
* (vc-backend-diff): get rid of the autoloaded advice.Stefan Monnier1999-10-111-13/+0
|
* Initial revision, known outside of Emacs as version 1.8.Stefan Monnier1999-10-091-0/+855