[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: List of buffers under version control?
From: |
John Mastro |
Subject: |
Re: List of buffers under version control? |
Date: |
Thu, 28 Jul 2016 12:52:08 -0700 |
Rolf Ade <rolf@pointsman.de> wrote:
> Since emacs show me in the mode line of that buffers, that the file is
> under version control, there must be a way with elisp to determine, if
> the file shown in a buffer is under version control. How could that be
> done?
You could use `vc-backend', e.g. (vc-backend (buffer-file-name)).
`save-some-buffers' accepts an argument PRED; you could also use
`vc-backend' there:
(save-some-buffers
nil
(lambda () (vc-backend (buffer-file-name))))
That way you don't need to loop through the buffer-list yourself.
John
- List of buffers under version control?, Rolf Ade, 2016/07/27
- Re: List of buffers under version control?, Rusi, 2016/07/28
- Re: List of buffers under version control?, Rolf Ade, 2016/07/28
- Re: List of buffers under version control?, Marcin Borkowski, 2016/07/28
- Message not available
- Re: List of buffers under version control?, Rolf Ade, 2016/07/28
- Re: List of buffers under version control?, John Mastro, 2016/07/28
- RE: List of buffers under version control?, Drew Adams, 2016/07/28
- Message not available
- Re: List of buffers under version control?, Rolf Ade, 2016/07/28
- Message not available
- Re: List of buffers under version control?, Rolf Ade, 2016/07/28
- Re: List of buffers under version control?, Stefan Monnier, 2016/07/28
Re: List of buffers under version control?, Yuri Khan, 2016/07/28
Message not available