[Top][All Lists]

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

bug#22339: 25.1.50; Shouldn't `abbrev-expand-function' be a user option?

From: Drew Adams
Subject: bug#22339: 25.1.50; Shouldn't `abbrev-expand-function' be a user option?
Date: Tue, 16 Feb 2016 06:38:48 -0800 (PST)

> > Subject line says it all.  Presumably this is a variable intended for
> > users to customize/set to a function of their liking.
> No, it looks more like something for programmers, and not users.  Closing.

Why do you think that?

Command `expand-abbrev' is user-facing.  Its doc string says that it:

  Calls `abbrev-expand-function' with no argument to do the work,
  and returns whatever it does.  (This should be the abbrev symbol
  if expansion occurred, else nil.)

That tells users that they can set `abbrev-expand-function' to a function
that has the behavior they want and return value described.  There would be
no reason to tell users about this if they were not expected to customize
the value to a function of their choice.  In that case, it would just be
part of the internal implementation of the command.

What's more, it used to be a user option, `pre-abbrev-expand-hook'.
It is still is, but is replaced (deprecated) by `abbrev-expand-function'.
There is nothing in NEWS about replacing this user option by an internal
variable.  The most that appears in NEWS, AFAICT, is that in Emacs 23
`pre-abbrev-expand-hook' was deprecated in favor of `abbrev-expand-functions',
and that has now be deprecated in favor of `abbrev-expand-function'.
Nothing in NEWS about this no longer being a user-customizable feature

The judgment that this variable "looks more like something for
programmers, and not users" makes little sense, to me.  What makes
it look that way, to you?  Why should users not set this variable?
And if they should not, why tell them about it in the command's doc?

reply via email to

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