[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a1deb86 145/215: Show default buffer when automatically at
From: |
Rocky Bernstein |
Subject: |
[elpa] master a1deb86 145/215: Show default buffer when automatically attaching |
Date: |
Sat, 30 Jul 2016 14:49:01 +0000 (UTC) |
branch: master
commit a1deb86ae498a3c0fce163ad57d276693e2875fb
Author: Clément Pit--Claudel <address@hidden>
Commit: Clément Pit--Claudel <address@hidden>
Show default buffer when automatically attaching
---
realgud/common/buffer/source.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/realgud/common/buffer/source.el b/realgud/common/buffer/source.el
index ca0ac85..1bd82b9 100644
--- a/realgud/common/buffer/source.el
+++ b/realgud/common/buffer/source.el
@@ -72,12 +72,13 @@ to be debugged."
(defun realgud--read-cmd-buf (prompt)
"Read a command buffer, prompting with PROMPT."
(let* ((cmd-bufs (cl-remove-if-not #'realgud-cmdbuf? (buffer-list)))
- (cmd-buf-names (mapcar #'buffer-name cmd-bufs)))
- (when cmd-buf-names
+ (buf-names (mapcar #'buffer-name cmd-bufs))
+ (default (car buf-names)))
+ (when buf-names
;; Use completing-read instead of read-buffer: annoyingly, ido's
;; read-buffer ignores predicates.
- (get-buffer (completing-read prompt cmd-buf-names nil t
- nil nil (car cmd-buf-names))))))
+ (setq prompt (format "%s (default: %s): " prompt default))
+ (get-buffer (completing-read prompt buf-names nil t nil nil default)))))
(defun realgud--ensure-attached (&optional src-buf)
"Try to attach SRC-BUF to a command buffer.
@@ -87,7 +88,7 @@ non-nil if association was successful. SRC-BUF defaults to
current buffer."
(setq src-buf (or src-buf (current-buffer)))
(unless (realgud-srcbuf? src-buf)
- (let ((cmd-buf (realgud--read-cmd-buf "Command buffer to associate to: ")))
+ (let ((cmd-buf (realgud--read-cmd-buf "Command buffer to attach to")))
(if cmd-buf
(realgud-srcbuf-init src-buf cmd-buf)
(message "No debugger process found to attach %s to" (buffer-name)))))
- [elpa] master 30398e1 099/215: ipdb: add test, (continued)
- [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
- [elpa] master a1deb86 145/215: Show default buffer when automatically attaching,
Rocky Bernstein <=
- [elpa] master 949ed38 110/215: fake realgud:run-process better, Rocky Bernstein, 2016/07/30
- [elpa] master b346e13 111/215: Improve completion and default value in realgud-query-cmdline, Rocky Bernstein, 2016/07/30
- [elpa] master 74ee75c 101/215: Remove stray character, Rocky Bernstein, 2016/07/30
- [elpa] master ba97f2b 126/215: Merge pull request #93 from cpitclaudel/small-fixes-in-cmds, Rocky Bernstein, 2016/07/30
- [elpa] master 0f6b10f 148/215: Add python3 shebang to fringe-utils.py, Rocky Bernstein, 2016/07/30
- [elpa] master 72c83d7 114/215: Improve command mappings in pdb-command-hash, Rocky Bernstein, 2016/07/30
- [elpa] master ff1dfe9 078/215: Change fringe arrow background colors based on dark or light background., Rocky Bernstein, 2016/07/30
- [elpa] master 45fb7cc 085/215: Add ability to have alternate group location file and line numbers., Rocky Bernstein, 2016/07/30
- [elpa] master baab01d 061/215: Merge branch 'master' of github.com:rocky/emacs-dbgr, Rocky Bernstein, 2016/07/30
- [elpa] master d437c3d 113/215: Merge pull request #81 from rocky/ipdb-complete, Rocky Bernstein, 2016/07/30