Subject: Re: bug#11477: 23.1; which-func-cleanup-function should be local
From: Stefan Monnier <[email-masked]>
To: Jack Duthen <[email-masked]>
Cc: [email-masked]
Date: Tue, 15 May 2012 11:46:22 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> So, as the function name contained in the variable
> "which-func-cleanup-function" can be mode-dependent,
> I think that "which-func-cleanup-function" should be declared
> as buffer local.

locality does not have to be a global property of a variable.
If you only want your cleanup function to be used in a particular
mode/buffer, then set it with (set (make-local-variable '<var>) <val>)
(now available as `setq-local') rather than with `setq'.

        Stefan