[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2a708cc 068/215: Error on realgud:cmdbuf-associate if you
From: |
Rocky Bernstein |
Subject: |
[elpa] master 2a708cc 068/215: Error on realgud:cmdbuf-associate if you assocate a non-command buffer. |
Date: |
Sat, 30 Jul 2016 14:48:54 +0000 (UTC) |
branch: master
commit 2a708cc9930c80e4ebc246b7e9c747121e76f9a6
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Error on realgud:cmdbuf-associate if you assocate a non-command buffer.
TODO: only suggest cmdbuf buffers.
---
realgud/common/buffer/source.el | 14 ++++++++++----
realgud/common/send.el | 2 +-
2 files changed, 11 insertions(+), 5 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/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")
- [elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet, (continued)
- [elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet, Rocky Bernstein, 2016/07/30
- [elpa] master 1790056 059/215: Typo: Issue #45, Rocky Bernstein, 2016/07/30
- [elpa] master a016c6f 050/215: Administrivia, Rocky Bernstein, 2016/07/30
- [elpa] master 0dd37e2 053/215: Revise trepanjs regexps and add regexp test., Rocky Bernstein, 2016/07/30
- [elpa] master dd0c60a 066/215: I said remove perl5db as an alias, Rocky Bernstein, 2016/07/30
- [elpa] master 0514c68 069/215: Add melpa (nonstable) tag, Rocky Bernstein, 2016/07/30
- [elpa] master bdf317e 060/215: Try flycheck on this file., Rocky Bernstein, 2016/07/30
- [elpa] master 26fd0de 062/215: Show failure in message and in cmdbuf when we fail to invoke a debugger, Rocky Bernstein, 2016/07/30
- [elpa] master 3071b70 065/215: Try cask, Rocky Bernstein, 2016/07/30
- [elpa] master 3b0e42c 067/215: realgud-exec-shell: Make sure we switch to cmdbuf even when there is an, Rocky Bernstein, 2016/07/30
- [elpa] master 2a708cc 068/215: Error on realgud:cmdbuf-associate if you assocate a non-command buffer.,
Rocky Bernstein <=
- [elpa] master 26369c1 074/215: Typo, Rocky Bernstein, 2016/07/30
- [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