[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 518dccd 070/215: Merge branch 'master' of github.com:rocky
From: |
Rocky Bernstein |
Subject: |
[elpa] master 518dccd 070/215: Merge branch 'master' of github.com:rocky/emacs-dbgr |
Date: |
Sat, 30 Jul 2016 14:48:54 +0000 (UTC) |
branch: master
commit 518dccd8a62cac9a80d7c0262c03779c146c0c74
Merge: 0514c68 2a708cc
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Merge branch 'master' of github.com:rocky/emacs-dbgr
---
realgud/common/buffer/source.el | 14 ++++++++++----
realgud/common/core.el | 24 ++++++++++++------------
realgud/common/run.el | 8 +++-----
realgud/common/send.el | 2 +-
realgud/debugger/gdb/gdb.el | 11 ++++++-----
5 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/realgud/common/buffer/source.el b/realgud/common/buffer/source.el
index 7294bba..e99a026 100644
--- a/realgud/common/buffer/source.el
+++ b/realgud/common/buffer/source.el
@@ -14,6 +14,7 @@
(declare-function buffer-loc-line-number? 'realgud-loc)
(declare-function realgud-cmdbuf-add-srcbuf 'realgud-cmdbuf)
(declare-function realgud-cmdbuf-info-bp-list 'realgud-cmdbuf)
+(declare-function realgud-cmdbuf? 'realgud-cmdbuf)
(declare-function realgud-loc-marker 'realgud-loc)
(declare-function realgud-loc-line-number 'realgud-loc)
(declare-function realgud-loc-num 'realgud-loc)
@@ -118,13 +119,18 @@ in it with those from CMDPROC-BUFFER"
(realgud-srcbuf-info-cmdproc= cmdproc-buffer)
(realgud-srcbuf-init src-buffer cmdproc-buffer))))
+;; FIXME: rewrite to add prompt function that only suggests
+;; command buffers;
(defun realgud:cmdbuf-associate(cmdbuf-name)
-"Associate a command buffer with for the current buffer which is
+ "Associate a command buffer with for the current buffer which is
assumed to be a source-code buffer"
(interactive "brealgud command buffer: ")
- (realgud-srcbuf-init-or-update (current-buffer) (get-buffer cmdbuf-name))
- (realgud-short-key-mode-setup 't)
- )
+ (let ((cmdbuf (get-buffer cmdbuf-name)))
+ (unless (realgud-cmdbuf? cmdbuf)
+ (error "%s doesn't smell like a command buffer" cmdbuf-name))
+ (realgud-srcbuf-init-or-update (current-buffer) cmdbuf )
+ (realgud-short-key-mode-setup 't)
+ ))
(defun realgud-srcbuf-bp-list(&optional buffer)
"Return a list of breakpoint loc structures that reside in
diff --git a/realgud/common/core.el b/realgud/common/core.el
index 4f8f344..71b81b8 100644
--- a/realgud/common/core.el
+++ b/realgud/common/core.el
@@ -270,10 +270,10 @@ marginal icons is reset."
(error
(let ((text (format "%S\n" failure)))
(insert text)
- (message text)(sit-for 2)
- text)))
+ (message text)(sit-for 1)
+ text)))
- (setq process (get-buffer-process cmdproc-buffer))
+ (setq process (get-buffer-process cmdproc-buffer))
(if (and process (eq 'run (process-status process)))
(let ((src-buffer)
@@ -283,16 +283,16 @@ marginal icons is reset."
(setq src-buffer (find-file-noselect script-filename))
(point-max)
(realgud-srcbuf-init src-buffer cmdproc-buffer))
- )
+ (process-put process 'buffer cmdproc-buffer))
;; else
- (insert
- (format
- "Failed to invoke debugger %s on program %s with args %s\n"
- debugger-name program (mapconcat 'identity args " ")))
- (error cmdproc-buffer)
- )
- (process-put process 'buffer cmdproc-buffer)))
- cmdproc-buffer))
+ (let ((text
+ (format
+ "Failed to invoke debugger %s on program %s with args %s\n"
+ debugger-name program (mapconcat 'identity args " "))))
+ (with-current-buffer cmdproc-buffer (insert text))
+ (message text)
+ ))
+ cmdproc-buffer))))
;; Start of a term-output-filter for term.el
(defun realgud-term-output-filter (process string)
diff --git a/realgud/common/run.el b/realgud/common/run.el
index 5e4bc5f..1108673 100644
--- a/realgud/common/run.el
+++ b/realgud/common/run.el
@@ -118,11 +118,9 @@ the program, we will switch to the command buffer which
shows
details of the error. The command buffer or nil is returned."
(let ((cmd-buf))
- (condition-case nil
- (setq cmd-buf
- (apply 'realgud-exec-shell debugger-name script-filename
- (car cmd-args) no-reset (cdr cmd-args)))
- (error nil))
+ (setq cmd-buf
+ (apply 'realgud-exec-shell debugger-name script-filename
+ (car cmd-args) no-reset (cdr cmd-args)))
;; FIXME: Is there probably is a way to remove the
;; below test and combine in condition-case?
(let ((process (get-buffer-process cmd-buf)))
diff --git a/realgud/common/send.el b/realgud/common/send.el
index 7ec0051..7fdf561 100644
--- a/realgud/common/send.el
+++ b/realgud/common/send.el
@@ -106,7 +106,7 @@ results into the command buffer."
)
(if (realgud-sget 'cmdbuf-info 'in-debugger?)
(funcall send-command-fn process command)
- (error "Command buffer doesn't think a debugger is running")
+ (error "Command buffer doesn't think a debugger is running - Use
`realgud-cmdbuf-toggle-in-debugger?' to toggle")
)
))
(error "Can't find command process buffer")
diff --git a/realgud/debugger/gdb/gdb.el b/realgud/debugger/gdb/gdb.el
index 168d2d2..c93c4db 100644
--- a/realgud/debugger/gdb/gdb.el
+++ b/realgud/debugger/gdb/gdb.el
@@ -83,12 +83,13 @@ fringe and marginal icons.
nil))
)
(if cmd-buf
- (with-current-buffer cmd-buf
- (realgud-command "set annotate 1" nil nil nil)
- )
+ (let ((process (get-buffer-process cmd-buf)))
+ (if (and process (eq 'run (process-status process)))
+ (with-current-buffer cmd-buf
+ (realgud-command "set annotate 1" nil nil nil)
+ )))
)
- )
- )
+ ))
(provide-me "realgud-")
- [elpa] master 4a83877 064/215: perl5db alias messes up realgud-track-mode, so drop that name., (continued)
- [elpa] master 4a83877 064/215: perl5db alias messes up realgud-track-mode, so drop that name., Rocky Bernstein, 2016/07/30
- [elpa] master d3953ae 092/215: Fix bug in picking out short-key variable name introduced by recent changes, Rocky Bernstein, 2016/07/30
- [elpa] master 2facb99 075/215: init.el: break and clear command use %X rather than %l, Rocky Bernstein, 2016/07/30
- [elpa] master 7edc244 063/215: wrong args in jdb invocation; issue #51. Disable some jdb commands we, Rocky Bernstein, 2016/07/30
- [elpa] master ca52896 071/215: A workaround: reinitialize shell mode when going out of realgud-track-mode, Rocky Bernstein, 2016/07/30
- [elpa] master eee3112 089/215: track.el: Allow us to separate stem variable name to get debugger config from debugger name. This will make it easier, Rocky Bernstein, 2016/07/30
- [elpa] master 1eda9a1 076/215: Partially addresses #61. Handling multiple breakpoints on a line still, Rocky Bernstein, 2016/07/30
- [elpa] master a216bf0 084/215: Last commit set wrong variables, Rocky Bernstein, 2016/07/30
- [elpa] master 1420ff1 096/215: ipdb: add hook for completion to initialization, Rocky Bernstein, 2016/07/30
- [elpa] master 924969d 095/215: ipdb: add tab completion, Rocky Bernstein, 2016/07/30
- [elpa] master 518dccd 070/215: Merge branch 'master' of github.com:rocky/emacs-dbgr,
Rocky Bernstein <=
- [elpa] master 30398e1 099/215: ipdb: add test, Rocky Bernstein, 2016/07/30
- [elpa] master 6a5c71d 112/215: Merge pull request #80 from cpitclaudel/master, Rocky Bernstein, 2016/07/30
- [elpa] master 5bcb424 082/215: Add Kilian, Rocky Bernstein, 2016/07/30
- [elpa] master 75737a0 121/215: Merge pull request #90 from cpitclaudel/82-add-prefix-arg-to-c, Rocky Bernstein, 2016/07/30
- [elpa] master e8fc998 116/215: Merge pull request #85 from cpitclaudel/84-pdb-fixes, Rocky Bernstein, 2016/07/30
- [elpa] master 0cf9321 125/215: Small fixes in cmds.el, Rocky Bernstein, 2016/07/30
- [elpa] master 8c8f9f1 093/215: Not sure why this initialization was there, but it is syntactically, Rocky Bernstein, 2016/07/30
- [elpa] master 6a87f3c 097/215: ipdb: add tab completion to track-mode, Rocky Bernstein, 2016/07/30
- [elpa] master cfe2be3 107/215: Reinstate ipdb support, Rocky Bernstein, 2016/07/30
- [elpa] master d15f90a 132/215: Prepare for refactoring of realgud-cmd, Rocky Bernstein, 2016/07/30