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

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

[elpa] master f360ead 31/56: Allow nil as file parameter in realgud-exec


From: Rocky Bernstein
Subject: [elpa] master f360ead 31/56: Allow nil as file parameter in realgud-exec-shell
Date: Sat, 27 May 2017 05:02:34 -0400 (EDT)

branch: master
commit f360eadca3263624bb9e3380eb5cd2f7ab728c9c
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Allow nil as file parameter in realgud-exec-shell
    
    Fixes #165
---
 realgud/common/core.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/realgud/common/core.el b/realgud/common/core.el
index d7dade7..25de3d7 100644
--- a/realgud/common/core.el
+++ b/realgud/common/core.el
@@ -228,15 +228,16 @@ NO-RESET is nil, then that information which may point 
into other
 buffers and source buffers which may contain marks and fringe or
 marginal icons is reset."
 
-  (let* ((current-directory
-         (or (file-name-directory script-filename)
+  (let* ((non-nil-filename (or script-filename "+No filename+"))
+        (current-directory
+         (or (file-name-directory non-nil-filename)
              default-directory "./"))
         (cmdproc-buffer-name
          (replace-regexp-in-string
           "\s+" "\s"
           (format "*%s %s shell*"
                   (file-name-nondirectory debugger-name)
-                  (file-name-nondirectory script-filename))))
+                  (file-name-nondirectory non-nil-filename))))
         (cmdproc-buffer (get-buffer-create cmdproc-buffer-name))
         (realgud-buf (current-buffer))
         (cmd-args (cons program args))
@@ -302,7 +303,7 @@ marginal icons is reset."
          (let ((src-buffer)
                (cmdline-list (cons program args)))
            ;; is this right?
-           (when (and (file-exists-p script-filename)
+           (when (and script-filename (file-exists-p script-filename)
                       (not (realgud:binary script-filename)))
              (setq src-buffer (find-file-noselect script-filename))
              (point-max)



reply via email to

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