emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 06ecc45 086/215: Add C-c ! d in a command buffer to get fr


From: Rocky Bernstein
Subject: [elpa] master 06ecc45 086/215: Add C-c ! d in a command buffer to get from a debugger location line in
Date: Sat, 30 Jul 2016 14:48:56 +0000 (UTC)

branch: master
commit 06ecc451bb94c2033f02193c23d6da9ae92128e2
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Add C-c ! d in a command buffer to get from a debugger location line in
    the command buffer to the corresponding source. Add
    realgud:goto-debugger-loc-line. Revise doc strings.
---
 realgud/common/track-mode.el |    1 +
 realgud/common/track.el      |   31 ++++++++++++++++++++++---------
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/realgud/common/track-mode.el b/realgud/common/track-mode.el
index 80e4bd5..bf0888b 100644
--- a/realgud/common/track-mode.el
+++ b/realgud/common/track-mode.el
@@ -51,6 +51,7 @@
     (define-key map [M-S-down] 'realgud-track-hist-newest)
     (define-key map [M-S-up]   'realgud-track-hist-oldest)
     (define-key map "\C-cS" 'realgud-window-src-undisturb-cmd)
+    (define-key map (kbd "C-c !d") 'realgud:goto-debugger-loc-line)
     map)
   "Keymap used in `realgud-track-minor-mode'.
 
diff --git a/realgud/common/track.el b/realgud/common/track.el
index feab85a..360d7fe 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -677,13 +677,18 @@ debugger with that information"
 
 ;; FIXME: need better name for this and next fn.
 (defun realgud-goto-line-for-pt-and-type (pt type pat-hash)
-  "Display the location mentioned for PT given type PAT-HASH indexed TYPE."
+  "Position the source code at the location that is matched by
+PAT-HASH with key TYPE. The line at PT is used as the string
+to match against and has location info embedded in it"
   (realgud-goto-line-for-loc-pat pt (gethash type pat-hash)))
 
 
 (defun realgud-goto-line-for-pt (pt pattern-key)
-  "Display the location mentioned by a backtrace line (e.g. Ruby $!)
-described by PT."
+  "Position the source code at the location indicated by a
+pattern found in the command buffer with pattern-key
+PATTERN-KEY. (PATTERN-KEY is something like 'debugger-backtrace'
+or 'loc'.) The line at PT is used as the string to match against
+and has location info embedded in it"
   (interactive "d")
   (unless (realgud-cmdbuf?)
     (error "You need to be in a debugger command buffer to run this"))
@@ -694,19 +699,27 @@ described by PT."
   )
 
 (defun realgud:goto-debugger-backtrace-line (pt)
-  "Display the location mentioned by the debugger backtrace line
-described by PT."
+  "Position the source code at the location indicated by matching a
+command buffer's debugger backtrace pattern against the line at PT."
   (interactive "d")
   (unless (realgud-goto-line-for-pt pt "debugger-backtrace")
-    (message "Didn't match a debugger backtrace location.")
+    (message "Line didn't match a debugger backtrace location.")
     ))
 
 (defun realgud:goto-lang-backtrace-line (pt)
-  "Display the location mentioned by the programming-language backtrace line
-described by PT."
+  "Position the source code at the location indicated by matching a
+command buffer's programming-language backtrace pattern against the line at 
PT."
   (interactive "d")
   (unless (realgud-goto-line-for-pt pt "lang-backtrace")
-    (message "Didn't match a programming-language backtrace location.")
+    (message "Line didn't match a programming-language backtrace location.")
+    ))
+
+(defun realgud:goto-debugger-loc-line (pt)
+  "Position the source-code at the location indicated by matching a
+command buffer's debugger location pattern against the line at PT."
+  (interactive "d")
+  (unless (realgud-goto-line-for-pt pt "loc")
+    (message "Line didn't match a debugger location indicator line.")
     ))
 
 (provide-me "realgud-")



reply via email to

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