Function: vc-default-ignore

vc-default-ignore is a byte-compiled function defined in vc.el.gz.

Signature

(vc-default-ignore BACKEND FILE &optional DIRECTORY REMOVE)

Documentation

Ignore FILE under DIRECTORY (default is default-directory).

FILE is a wildcard specification relative to DIRECTORY.

When called from Lisp code, if DIRECTORY is non-nil, the repository to use will be deduced by DIRECTORY.

If REMOVE is non-nil, remove FILE from ignored files instead.

Argument BACKEND is the backend to use.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc-default-ignore (backend file &optional directory remove)
  "Ignore FILE under DIRECTORY (default is `default-directory').
FILE is a wildcard specification relative to DIRECTORY.

When called from Lisp code, if DIRECTORY is non-nil, the
repository to use will be deduced by DIRECTORY.

If REMOVE is non-nil, remove FILE from ignored files instead.

Argument BACKEND is the backend to use."
  (let ((ignore
         (vc-call-backend backend
                          'find-ignore-file
                          (or directory default-directory))))
    (if remove
        (vc--remove-regexp (concat "^" (regexp-quote file) "\\(\n\\|$\\)") ignore)
      (vc--add-line file ignore))))