emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 45a1653: ; Fix last change to bibtex.el


From: Roland Winkler
Subject: Re: master 45a1653: ; Fix last change to bibtex.el
Date: Wed, 18 Nov 2020 11:11:43 -0600

On Wed Nov 18 2020 Basil L. Contovounesios wrote:
> > From a different perspective, if bibtex-unify-case-convert was a
> > variable holding a function name, the variable name should be
> > something like bibtex-unify-case-convert-function.
> 
> Instead of marking the user option as :risky, why not give it a :safe
> predicate that checks whether it's one of the predefined values?

I believe the philosophy is "better safe than sorry".
See the elisp section on file-local variables:

  In addition, any variable whose name ends in any of
  ‘-command’, ‘-frame-alist’, ‘-function’, ‘-functions’, ‘-hook’,
  ‘-hooks’, ‘-form’, ‘-forms’, ‘-map’, ‘-map-alist’, ‘-mode-alist’,
  ‘-program’, or ‘-predicate’ is automatically considered risky.

The problem is really about allowing user-defined functions.  If one
excludes user-defined functions and allows only predefined
functions, the entire 'funcall ...-function' thing is not needed,
that is, the variable can hold a symbol that triggers a hard-coded call
of a predefined function.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]