]> code.delx.au - gnu-emacs-elpa/commitdiff
Correct font-lock regexps for remake backtrace.
authorrocky <rocky@gnu.org>
Tue, 12 Apr 2011 11:10:53 +0000 (07:10 -0400)
committerrocky <rocky@gnu.org>
Tue, 12 Apr 2011 11:10:53 +0000 (07:10 -0400)
dbgr/common/cmds.el
dbgr/common/fringe.el
dbgr/common/window.el
dbgr/debugger/remake/init.el

index dc79ca20dbfd5d6e547ab823645920b7726570d2..1090b5c74dd011ed5d8d9a1f9932e19149f03138 100644 (file)
@@ -21,6 +21,16 @@ if none has been set in the command hash."
        (setq cmd default-cmd-template))
       )
     (dbgr-command cmd arg no-record? frame-switch? dbgr-prompts?)
+    ;; FIXME: Figure out how to update the position if the source
+    ;; buffer is displayed.
+    ;; (if frame-switch?
+    ;;         (let* ((src-buffer (dbgr-get-srcbuf-from-cmdbuf cmdbuf))
+    ;;                (src-window (get-buffer-window src-buffer))
+    ;;                ))
+    ;;           (with-selected-window src-window
+    ;;             (message "recentering...")
+    ;;             (dbgr-recenter-arrow)
+    ;;           ))
     )
   ;; FIXME: this is a one-time thing. Put in caller.
   (local-set-key (format "\C-c%s" key) 
@@ -59,7 +69,7 @@ This command is often referred to as 'step out' as opposed to
 'step over' or 'step into'.
 "
     (interactive "p")
-    (dbgr-cmd-remap arg "finish" "finish" "F")
+    (dbgr-cmd-remap arg "finish" "finish" ".")
 )
 
 (defun dbgr-cmd-frame(&optional arg)
index 6328ba38f822932e3c086b8d0f661cc982eea064..c5d2b1a90261c867e3d774668a4460b2e2597e0d 100644 (file)
@@ -173,17 +173,21 @@ session which should also erase those fringe arrows."
   "If the current buffer contains dbgr-overlay-arrows 1, 2 or 3 
    recenter window to show that"
   (interactive "")
+  ;; We need to update in the order 3..1 so that if there are more than on
+  ;; arrows in the same buffer the smaller number (e.g. arrow 1) is the 
+  ;; position we are at rather than the earlier one (e.g. arrow 3).
+  (if (and dbgr-overlay-arrow3 
+          (eq (marker-buffer dbgr-overlay-arrow3) (current-buffer)))
+      (goto-char dbgr-overlay-arrow3)
+    )
+  (if (and dbgr-overlay-arrow2 
+          (eq (marker-buffer dbgr-overlay-arrow2) (current-buffer)))
+      (goto-char dbgr-overlay-arrow2)
+    )
   (if (and dbgr-overlay-arrow1 
           (eq (marker-buffer dbgr-overlay-arrow1) (current-buffer)))
       (goto-char dbgr-overlay-arrow1)
-    (if (and dbgr-overlay-arrow2 
-            (eq (marker-buffer dbgr-overlay-arrow2) (current-buffer)))
-       (goto-char dbgr-overlay-arrow2)
-      (if (and dbgr-overlay-arrow3 
-          (eq (marker-buffer dbgr-overlay-arrow3) (current-buffer)))
-         (goto-char dbgr-overlay-arrow3)
-       )
-      ))
+    )
   )
 
 
index 706c2d63668254856e294d813413cd43425e5659..c8fce30b71e36ffb69a3ef0aaa39e229df9ee6b7 100644 (file)
@@ -34,7 +34,7 @@ See also `dbgr-window-src-undistub-cmd'"
   "Make sure the source buffers is displayed in windows without
 disturbing the command window if it is also displayed. Returns
 the command window
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
   (interactive)
   (let* ((buffer (or opt-buffer (current-buffer)))
         (src-buffer (dbgr-get-srcbuf buffer))
@@ -61,7 +61,7 @@ See also `dbgr-window-src-window'"
   "Make sure the source buffer is displayed in windows without
 disturbing the command window if it is also displayed. Returns
 the source window.
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
   (interactive)
   (let* ((buffer (or opt-buffer (current-buffer)))
         (src-buffer (dbgr-get-srcbuf buffer))
@@ -94,7 +94,7 @@ See also `dbgr-window-src-window'"
   "Make sure the backtrace buffer is displayed in windows without
 disturbing the source window if it is also displayed. Returns
 the source window
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
   (interactive)
   (let* ((buffer (or opt-buffer (current-buffer)))
         (src-buffer (dbgr-get-srcbuf buffer))
index 5f723177b1c50e5b32e410b35fbc76c985dd367e..02ea52f75e09987b861bc57a92d0af7f90dc940f 100644 (file)
@@ -53,11 +53,11 @@ dbgr-loc-pat struct")
        :num 1))
 
 (defconst dbgr-remake-frame-start-regexp
-  "\\(?:^\\|\n\\)\\(=>\\|  \\)#")
+  "\\(?:^\\|\n\\)\\(=>\\|  \\)")
 (defconst dbgr-remake-frame-num-regexp
-  "\\([0-9]+\\)")
+  "#\\([0-9]+\\)  ")
 
-(defconst dbgr-remake-frame-file-regexp "\\(.*\\):\\([0-9]+\\)")
+(defconst dbgr-remake-frame-file-regexp " at \\(.*\\):\\([0-9]+\\)")
 
 ;; Regular expression that describes a debugger "backtrace" command line.
 ;; For example:
@@ -66,8 +66,8 @@ dbgr-loc-pat struct")
 (setf (gethash "frame" dbgr-remake-pat-hash)
       (make-dbgr-loc-pat
        :regexp         (concat dbgr-remake-frame-start-regexp
-                       dbgr-remake-frame-num-regexp "  "
-                       "\\(.*\\)" " at "
+                       dbgr-remake-frame-num-regexp
+                       "\\(.*\\)"
                        dbgr-remake-frame-file-regexp
                        )
        :num 2
@@ -77,20 +77,18 @@ dbgr-loc-pat struct")
 
 (setf (gethash "font-lock-keywords" dbgr-remake-pat-hash)
       '(
+       ;; ;; File name and line number
+       ;; ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
+       ;; ;;                       ----^^^^^^^^^^^^^^^^^
+       (" at \\(.*\\):\\([0-9]+\\)"
+        (1 dbgr-file-name-face)
+        (2 dbgr-line-number-face))
+
        ;; The frame number and first type name, if present.
        ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
        ;;      ---^
-       ((concat dbgr-remake-frame-start-regexp
-                dbgr-remake-frame-num-regexp)
-        (2 dbgr-backtrace-number-face))
-
-       ;; File name.
-       ;; E.g. =>#0  Makefile.in at /tmp/Makefile:216
-       ;;            ---------------^^^^^^^^^^^^^^^^^
-       ((concat "  \\(.*\\)" " at " dbgr-remake-frame-file-regexp)
-        (2 dbgr-file-name-face)
-        (3 dbgr-line-number-face)
-        )
+       ("#\\([0-9]+\\)  "
+        (1 dbgr-backtrace-number-face))
        ))
 
 (setf (gethash "remake" dbgr-pat-hash) dbgr-remake-pat-hash)