[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'C-x 4 a' broken in diff buffer

From: Nick Roberts
Subject: 'C-x 4 a' broken in diff buffer
Date: Thu, 8 Feb 2007 10:51:03 +1300

This change breaks 'C-x 4 a' (add-change-log-entry-other-window) when used in
a diff (*vc-diff*) buffer:

revision 1.94
date: 2007-01-11 16:52:59 +0000;  author: monnier;  state: Exp;  lines: +83 -1
(diff-sanity-check-context-hunk-half, diff-sanity-check-hunk): New functions.
(diff-find-source-location): Use'em to check the hunks are well-formed.

e.g do 'C-x 4 a' on the added function in the text below (it has to be
in a (vc?) diff buffer).  It used to do:

2007-02-07  Nick Roberts  <address@hidden>

        * progmodes/gdb-ui.el (gdb-if-arrow): 

but now it does

2007-02-07  Nick Roberts  <address@hidden>

        * progmodes/gdb-ui.el: 

ISTR it also fails for changed functions (not just added ones).

Nick                                           http://www.inet.net.nz/~nickrob

*** gdb-ui.el   08 Feb 2007 10:06:25 +1300      1.203
--- gdb-ui.el   08 Feb 2007 10:13:21 +1300      
*************** With arg, use separate IO iff arg is pos
*** 606,611 ****
--- 606,621 ----
      (setq gdb-version "6.4+"))
+ (defmacro gdb-if-arrow (arrow-position &rest body)
+   `(if ,arrow-position
+       (let ((buffer (marker-buffer ,arrow-position)) (line))
+       (if (equal buffer (window-buffer (posn-window end)))
+           (with-current-buffer buffer
+             (when (or (equal start end)
+                       (equal (posn-point start)
+                              (marker-position ,arrow-position)))
+               ,@body))))))
  (defun gdb-mouse-until (event)
    "Continue running until a source line past the current line.
  The destination source line can be selected either by clicking with mouse-2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]