Variable: project-find-matching-buffer-function

project-find-matching-buffer-function is a variable defined in project.el.gz.

Value

project-find-matching-file-or-directory

Documentation

Function to switch to a matching buffer in another project.

Usually set buffer-locally by non-file-visiting major modes. The function will be called with two arguments, the project instance for this buffer's project, and the project instance for the matching buffer.

The default value works for file-visiting and Dired buffers. Non-file-visiting major modes (other than dired-mode), where there is a sensible notion of a matching buffer, can set this. File-visiting major modes shouldn't set it, except possibly some highly specialized ones.

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defvar project-find-matching-buffer-function
  #'project-find-matching-file-or-directory
  "Function to switch to a matching buffer in another project.
Usually set buffer-locally by non-file-visiting major modes.
The function will be called with two arguments, the project instance for
this buffer's project, and the project instance for the matching buffer.

The default value works for file-visiting and Dired buffers.
Non-file-visiting major modes (other than `dired-mode'), where there is
a sensible notion of a matching buffer, can set this.
File-visiting major modes shouldn't set it, except possibly some highly
specialized ones.")