Mercurial > emacs
comparison lisp/diff-mode.el @ 31749:a120dbf13af9
(diff-apply-hunk): Jump to the correct line offset in the dry-run case.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 20 Sep 2000 06:40:30 +0000 |
parents | 9d50fe5df6ce |
children | 181947e98152 |
comparison
equal
deleted
inserted
replaced
31748:6d580942d64b | 31749:a120dbf13af9 |
---|---|
2 | 2 |
3 ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
6 ;; Keywords: patch diff | 6 ;; Keywords: patch diff |
7 ;; Revision: $Id: diff-mode.el,v 1.16 2000/09/19 16:24:30 monnier Exp $ | 7 ;; Revision: $Id: diff-mode.el,v 1.17 2000/09/19 16:25:43 monnier Exp $ |
8 | 8 |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 | 10 |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | 12 ;; it under the terms of the GNU General Public License as published by |
1083 msg | 1083 msg |
1084 (- real-line patch-line))))) | 1084 (- real-line patch-line))))) |
1085 | 1085 |
1086 ;; fixup POS to reflect the hunk line offset | 1086 ;; fixup POS to reflect the hunk line offset |
1087 (goto-char pos) | 1087 (goto-char pos) |
1088 (forward-line (cdr new)) | 1088 (forward-line (cdr (if dry-run old new))) |
1089 (setq pos (point))) | 1089 (setq pos (point))) |
1090 | 1090 |
1091 ;; Display BUF in a window, and maybe select it | 1091 ;; Display BUF in a window, and maybe select it |
1092 (let ((win (display-buffer buf))) | 1092 (let ((win (display-buffer buf))) |
1093 (set-window-point win pos) | 1093 (set-window-point win pos) |