dabbrev-select-buffers-function is a variable defined in `dabbrev.el'.
Its value is

  • This variable may be risky if used as a file-local variable.

A function that selects buffers that should be searched by dabbrev.
The function should take no arguments and return a list of buffers to
search for expansions. See the source of `dabbrev--select-buffers'
for an example.

A mode setting this variable should make it buffer local.