help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: vc-rename-file() if possible otherwise rename-file()


From: Nikolaj Schumacher
Subject: Re: vc-rename-file() if possible otherwise rename-file()
Date: Tue, 18 Mar 2008 20:26:39 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (darwin)

Nordlöw <per.nordlow@gmail.com> wrote:

> Looking for a small snippet that does vc-rename-file() when possible
> (source file is under version control) otherwise default to rename-
> file(). The question is: How do I check if a file is under version
> control or not?

(if (vc-backend buffer-file-name)
    (vc-rename-file buffer-file-name new-name)
  (rename-file buffer-file-name new-name))


regards,
Nikolaj Schumacher




reply via email to

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