emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/vc.el,v


From: Sam Steingold
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el,v
Date: Thu, 12 Jun 2008 16:56:44 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Sam Steingold <sds>     08/06/12 16:56:43

Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.682
retrieving revision 1.683
diff -u -b -r1.682 -r1.683
--- vc.el       5 Jun 2008 15:53:05 -0000       1.682
+++ vc.el       12 Jun 2008 16:56:43 -0000      1.683
@@ -2497,6 +2497,11 @@
 (defun vc-rename-file (old new)
   "Rename file OLD to NEW, and rename its master file likewise."
   (interactive "fVC rename file: \nFRename to: ")
+  ;; in CL I would have said (setq new (merge-pathnames new old))
+  (let ((old-base (file-name-nondirectory old)))
+    (when (and (not (string= "" old-base))
+               (string= "" (file-name-nondirectory new)))
+      (setq new (concat new old-base))))
   (let ((oldbuf (get-file-buffer old)))
     (when (and oldbuf (buffer-modified-p oldbuf))
       (error "Please save files before moving them"))




reply via email to

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