diff options
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/files.texi | 15 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index ecc3e03967c..cb31ca5a3de 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1148,6 +1148,21 @@ compares the truenames of the two directories. If @var{dir} does not name an existing directory, the return value is @code{nil}. @end defun +@defun vc-responsible-backend file +This function determines the responsible VC backend of the given +@var{file}. For example, if @file{emacs.c} is a file tracked by Git, +@w{@code{(vc-responsible-backend "emacs.c")}} returns @samp{Git}. +Note that if @var{file} is a symbolic link, +@code{vc-responsible-backend} will not resolve it---the backend of the +symbolic link file itself is reported. To get the backend VC of the +file to which @var{file} refers, wrap @var{file} with a symbolic link +resolving function such as @code{file-chase-links}: + +@smallexample +(vc-responsible-backend (file-chase-links "emacs.c")) +@end smallexample +@end defun + @node File Attributes @subsection File Attributes @cindex file attributes diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 368d882a4b8..c7b6106ef5b 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2934,7 +2934,9 @@ This function removes @var{keywords} from @code{font-lock-keywords} for the current buffer or for major mode @var{mode}. As in @code{font-lock-add-keywords}, @var{mode} should be a major mode command name or @code{nil}. All the caveats and requirements for -@code{font-lock-add-keywords} apply here too. +@code{font-lock-add-keywords} apply here too. The argument +@var{keywords} must exactly match the one used by the corresponding +@code{font-lock-add-keywords}. @end defun For example, the following code adds two fontification patterns for C |