[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b346e13 111/215: Improve completion and default value in r
From: |
Rocky Bernstein |
Subject: |
[elpa] master b346e13 111/215: Improve completion and default value in realgud-query-cmdline |
Date: |
Sat, 30 Jul 2016 14:48:58 +0000 (UTC) |
branch: master
commit b346e137b18ad3368394c28135f6c04792c5e234
Author: Clément Pit--Claudel <address@hidden>
Commit: Clément Pit--Claudel <address@hidden>
Improve completion and default value in realgud-query-cmdline
---
realgud/common/core.el | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/realgud/common/core.el b/realgud/common/core.el
index cecd5ee..ad86499 100644
--- a/realgud/common/core.el
+++ b/realgud/common/core.el
@@ -47,13 +47,12 @@ Otherwise, just return FILENAME."
)
(defun realgud-suggest-invocation
- (debugger-name minibuffer-history lang-str lang-ext-regexp
+ (debugger-name _minibuffer-history lang-str lang-ext-regexp
&optional last-resort)
"Suggest a debugger command invocation. If the current buffer
is a source file or process buffer previously set, then use the
value of that the command invocations found by buffer-local
-variables. Next, try to use the first value of MINIBUFFER-HISTORY
-if that exists. Finally we try to find a suitable program file
+variables. Otherwise, we try to find a suitable program file
using LANG-STR and LANG-EXT-REGEXP."
(let* ((buf (current-buffer))
(filename)
@@ -62,12 +61,11 @@ using LANG-STR and LANG-EXT-REGEXP."
(cond
((and cmd-str-cmdbuf (equal debugger-name (realgud-cmdbuf-debugger-name
buf)))
cmd-str-cmdbuf)
- ((and minibuffer-history (listp minibuffer-history))
- (car minibuffer-history))
((setq filename (realgud:suggest-file-from-buffer lang-str))
- (concat debugger-name " " filename))
+ (concat debugger-name " " (shell-quote-argument filename)))
(t (concat debugger-name " "
- (realgud-suggest-lang-file lang-str lang-ext-regexp
last-resort)))
+ (shell-quote-argument
+ (realgud-suggest-lang-file lang-str lang-ext-regexp
last-resort))))
)))
(defun realgud-query-cmdline
@@ -86,11 +84,9 @@ We also set filename completion and use a history of the
prior
dbgr invocations "
(let ((debugger (or opt-debugger
(realgud-sget 'srcbuf-info 'debugger-name))))
- (read-from-minibuffer
+ (read-shell-command
(format "Run %s (like this): " debugger) ;; prompt string
(funcall suggest-invocation-fn debugger) ;; initial value
- minibuffer-local-map ;; keymap
- nil ;; read - use default value
minibuffer-history ;; history variable
)))
- [elpa] master 5bcb424 082/215: Add Kilian, (continued)
- [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, 2016/07/30
- [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 <=
- [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
- [elpa] master 5155528 105/215: Bump version, Rocky Bernstein, 2016/07/30
- [elpa] master 76cb0d4 108/215: Fix wrong setq call, Rocky Bernstein, 2016/07/30