emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master baab20d 2/2: vc/vc-src.el (vc-src-do-comand): Prepe


From: Eric S. Raymond
Subject: [Emacs-diffs] master baab20d 2/2: vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument list
Date: Tue, 09 Dec 2014 11:59:44 +0000

branch: master
commit baab20d73e2a3ee6a06dc83fe97d0b781870e29f
Author: Eric S. Raymond <address@hidden>
Commit: Eric S. Raymond <address@hidden>

    vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument list
    
    * vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument list,
    avoids problems witth names containing hyphens.
---
 lisp/ChangeLog    |    5 +++++
 lisp/vc/vc-src.el |    7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 81afe8a..bf139d6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-09  Eric S. Raymond  <address@hidden>
+
+       * vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument
+       list, avoids problems witth names containing hyphens.
+
 2014-12-09  Wilson Snyder  <address@hidden>
 
        Sync with upstream verilog-mode revision aa4b777.
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 3186d72..36d6a20 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -193,7 +193,12 @@ For a description of possible values, see 
`vc-check-master-templates'."
 (defun vc-src-command (buffer file-or-list &rest flags)
   "A wrapper around `vc-do-command' for use in vc-src.el.
 This function differs from vc-do-command in that it invokes `vc-src-program'."
-  (apply 'vc-do-command (or buffer "*vc*") 0 vc-src-program file-or-list 
flags))
+  (let (file-list)
+    (cond ((stringp file-or-list)
+          (setq file-list (list "--" file-or-list)))
+         (file-or-list
+          (setq file-list (cons "--" file-or-list))))
+    (apply 'vc-do-command (or buffer "*vc*") 0 vc-src-program file-list 
flags)))
 
 (defun vc-src-working-revision (file)
   "SRC-specific version of `vc-working-revision'."



reply via email to

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