emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master d1c1176 146/215: Simplify the implementation of realgud:cm


From: Rocky Bernstein
Subject: [elpa] master d1c1176 146/215: Simplify the implementation of realgud:cmdbuf-associate
Date: Sat, 30 Jul 2016 14:49:01 +0000 (UTC)

branch: master
commit d1c1176ba410c9977d23869f4fb1af996639db27
Author: Clément Pit--Claudel <address@hidden>
Commit: Clément Pit--Claudel <address@hidden>

    Simplify the implementation of realgud:cmdbuf-associate
---
 realgud/common/buffer/source.el |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/realgud/common/buffer/source.el b/realgud/common/buffer/source.el
index 1bd82b9..b050014 100644
--- a/realgud/common/buffer/source.el
+++ b/realgud/common/buffer/source.el
@@ -144,18 +144,10 @@ 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
-assumed to be a source-code buffer"
-  (interactive "brealgud command buffer: ")
-  (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:cmdbuf-associate ()
+  "Associate a command buffer with the current (source-code) buffer."
+  ;; realgud-short-key-mode-setup will attempt to associate if needed.
+  (realgud-short-key-mode-setup t))
 
 (defun realgud-srcbuf-bp-list(&optional buffer)
   "Return a list of breakpoint loc structures that reside in



reply via email to

[Prev in Thread] Current Thread [Next in Thread]