Permalink
Browse files

Two bugs and a Makefile change. track hook can be called twice with s…

…econd time no change. Guard for that. (use-local-map) returns nil so use (current-local-map) again. In Makefiles: add "short" targets via an included common.mk more often.
  • Loading branch information...
1 parent eda0fe1 commit 5361365579d62b7ddc4c2e993a75f27745071297 @rocky rocky committed May 2, 2011
View
@@ -4,6 +4,9 @@ lispdir = @lispdir@
lisp_files := $(wildcard dbgr.el)
lisp_LISP = $(lisp_files)
+include common.mk
+
+EXTRA_DIST=common.mk README.textile
if MAINTAINER_MODE
@@ -20,14 +23,6 @@ test: check
check-short:
$(MAKE) check 2>&1 | ruby make-check-filter.rb
-short:
- $(MAKE) 2>&1 >/dev/null | ruby make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-tasks:
- remake --tasks | grep -v '/' | grep -v '\.'
View
@@ -0,0 +1,5 @@
+short:
+ $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
+
+%.short:
+ $(MAKE) $(@:.short=) 2>&1 >/dev/null
View
@@ -1,6 +1,8 @@
SUBDIRS = buffer init
MOSTLYCLEANFILES = *.elc
+include $(top_srcdir)/common.mk
+
lispdir = @lispdir_dbgr@/$(notdir $(subdir))
lisp_files := $(wildcard *.el)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/common.mk
+
lispdir = @lispdir_dbgr@/common/buffer
lisp_files := $(wildcard *.el)
lisp_LISP = $(lisp_files)
@@ -102,8 +102,7 @@ program."
(put 'dbgr-srcbuf-info 'variable-documentation
"Debugger information for a buffer containing source code.")))
-(defun dbgr-srcbuf-init-or-update
- (src-buffer cmdproc-buffer)
+(defun dbgr-srcbuf-init-or-update (src-buffer cmdproc-buffer)
"Call `dbgr-srcbuf-init' for SRC-BUFFER update `dbgr-srcbuf-info' variables
in it with those from CMDPROC-BUFFER"
(let ((debugger-name)
@@ -113,7 +112,10 @@ in it with those from CMDPROC-BUFFER"
(setq cmd-args (dbgr-cmdbuf-info-cmd-args dbgr-cmdbuf-info)))
(with-current-buffer-safe src-buffer
(dbgr-populate-common-keys
- (or (current-local-map) (use-local-map (make-sparse-keymap))))
+ ;; use-local-map returns nil so e have to call (current-local-map)
+ ;; again in this case.
+ (or (current-local-map) (use-local-map (make-sparse-keymap))
+ (current-local-map)))
(if (dbgr-srcbuf-info? dbgr-srcbuf-info)
(progn
(dbgr-srcbuf-info-cmdproc= cmdproc-buffer)
View
@@ -48,9 +48,14 @@ marks set in buffer-local variables to extract text"
(last-output-end (process-mark curr-proc))
(last-output-start (max comint-last-input-end
(- last-output-end dbgr-track-char-range))))
- (dbgr-track-from-region last-output-start
- last-output-end cmd-mark cmd-buff
- 't)))
+ ;; Sometimes e get called twice and the second time nothing
+ ;; Changes. Guard against this.
+ (unless (= last-output-start last-output-end)
+ (dbgr-track-from-region last-output-start
+ last-output-end cmd-mark cmd-buff
+ 't))
+ )
+ )
)
(defun dbgr-track-eshell-output-filter-hook()
@@ -260,13 +265,13 @@ encountering a new loc."
string TEXT. If we match, we will turn the result into a dbgr-loc struct.
Otherwise return nil."
- ; NOTE: dbgr-cmdbuf-info is a buffer variable local to the process running
- ; the debugger. It contains a dbgr-cmdbuf-info "struct". In that struct are
- ; the fields loc-regexp, file-group, and line-group. By setting the
- ; the fields of dbgr-cmdbuf-info appropriately we can accomodate a family
- ; of debuggers -- one at a time -- for the buffer process.
+ ;; NOTE: dbgr-cmdbuf-info is a buffer variable local to the process running
+ ;; the debugger. It contains a dbgr-cmdbuf-info "struct". In that struct are
+ ;; the fields loc-regexp, file-group, and line-group. By setting the
+ ;; the fields of dbgr-cmdbuf-info appropriately we can accomodate a family
+ ;; of debuggers -- one at a time -- for the buffer process.
- (if (dbgr-cmdbuf?)
+ (if (dbgr-cmdbuf?)
(let
((loc-regexp (or opt-regexp
(dbgr-sget 'cmdbuf-info 'loc-regexp)))
@@ -286,11 +291,12 @@ Otherwise return nil."
(message "Unable to file and line number for given line")
)
(and (message (concat "Buffer variable for regular expression pattern not"
- " given and not passed as a parameter")) nil)))
+ " given and not passed as a parameter")) nil)))
(and (message "Current buffer %s is not a debugger command buffer"
(current-buffer)) nil)
- ))
-
+ )
+ )
+
(defun dbgr-track-bp-loc(text &optional cmd-mark cmdbuf)
"Do regular-expression matching to find a file name and line number inside
string TEXT. If we match, we will turn the result into a dbgr-loc struct.
@@ -4,4 +4,4 @@ EXTRA_DIST = common.mk
.PHONY: check all
check:
- $(MAKE) -C ../../test $@
+ $(MAKE) -C $(top_srcdir)/test $@
View
@@ -1,3 +1,5 @@
+include $(top_srcdir)/common.mk
+
lispdir = @lispdir_dbgr@/debugger/$(notdir $(subdir))
lisp_files := $(wildcard *.el)
lisp_LISP = $(lisp_files)
@@ -1 +1 @@
-include ../common.mk
+include $(srcdir)/../common.mk
View
@@ -1,5 +1,5 @@
-# Whatever it is you want to do, it should be forwarded to the
-# to top-level directories
+include $(top_srcdir)/common.mk
+
PHONY=check test all
EXTRA_DIST=gcd.py gcd.rb
@@ -19,6 +19,8 @@ check-short:
test-%.run:
(cd $(top_srcdir)/test && $(EMACS) -batch -Q -l $(@:.run=.el) )
+# Whatever it is you want to do, it should be forwarded to the
+# to top-level directories
%:
$(MAKE) -C .. $@

0 comments on commit 5361365

Please sign in to comment.