aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Großjohann2004-06-13 16:48:44 +0000
committerKai Großjohann2004-06-13 16:48:44 +0000
commit6393ab2a792e545434e17bf7190815f6b64b6a2a (patch)
treed45601ae35ec01d5c363dacdeca6e96e659d1766
parentcea5d0d4234e3f208023e29873fdb199e0414749 (diff)
downloademacs-6393ab2a792e545434e17bf7190815f6b64b6a2a.tar.gz
emacs-6393ab2a792e545434e17bf7190815f6b64b6a2a.zip
(diff-current-defun): If at start of hunk, use
position of first change.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/diff-mode.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 10376008292..b810f87a565 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12004-06-13 Kai Grossjohann <kai.grossjohann@gmx.net>
2
3 * diff-mode.el (diff-current-defun): If at start of hunk, use
4 position of first change.
5
12004-06-13 Lars Hansen <larsh@math.ku.dk> 62004-06-13 Lars Hansen <larsh@math.ku.dk>
2 7
3 * dired-x.el (dired-mark-omitted): Bind to "*O". 8 * dired-x.el (dired-mark-omitted): Bind to "*O".
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 9b00eae050d..3e6d1b7ac57 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1248,9 +1248,12 @@ If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[u
1248(defun diff-current-defun () 1248(defun diff-current-defun ()
1249 "Find the name of function at point. 1249 "Find the name of function at point.
1250For use in `add-log-current-defun-function'." 1250For use in `add-log-current-defun-function'."
1251 (save-excursion
1252 (when (looking-at diff-hunk-header-re)
1253 (forward-line 1)
1254 (while (and (looking-at " ") (not (zerop (forward-line 1))))))
1251 (destructuring-bind (buf line-offset pos src dst &optional switched) 1255 (destructuring-bind (buf line-offset pos src dst &optional switched)
1252 (diff-find-source-location) 1256 (diff-find-source-location)
1253 (save-excursion
1254 (beginning-of-line) 1257 (beginning-of-line)
1255 (or (when (memq (char-after) '(?< ?-)) 1258 (or (when (memq (char-after) '(?< ?-))
1256 ;; Cursor is pointing at removed text. This could be a removed 1259 ;; Cursor is pointing at removed text. This could be a removed