Subject: Re: [Emacs-diffs] master d48e07a: * lisp/simple.el (next-error-find-buffer-function): New defcustom.

From: Stefan Monnier <[email-masked]>
Date: Fri, 23 Feb 2018 09:36:19 -0500

>> Could you arrange for the default value of this new *-function var not
>> to be nil so we can modify it with add-function?
> Then I guess the default function should return nil.  Here is a new patch:

Fine by me.  Tho, see comments below.

        Stefan

> +(defun next-error-find-buffer-function-default (&optional avoid-current
> +                                                          extra-test-inclusive
> +                                                          extra-test-exclusive))

This looks like a syntax error to me (function without body).  I know
it's accepted (because various parts of the byte-compiler need special
hacks to deal with it), but please always put a body (i.e. an explicit nil).

This said, I don't think you should define this function.  Instead:

> +(defvar next-error-find-buffer-function 'next-error-find-buffer-function-default

should just say

    (defvar next-error-find-buffer-function #'ignore

-- Stefan