all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25776: 24.5; `imenu--generic-function' is not internal
@ 2017-02-17 17:01 Drew Adams
  2019-07-26 12:50 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2017-02-17 17:01 UTC (permalink / raw)
  To: 25776

It is a relatively recent mania to name functions and variables using
`--' to indicate that they are internal.  This function should not be so
named.  It is referred to in several doc strings.  We do not (should
not) name functions specially just because we want to indicate that
users probably do not want to redefine them or that they are especially
likely to have their implementations changed in the future.  We don't
name `forward-char' `forward--char' just because it is (truly)
"internal".

Users exploring the doc strings of `imenu.el' encounter this function
name throughout.  Particularly if it is important to refer to the
function when documenting user-visible behavior, it makes little sense
to call it out as something "internal".

It is enough to add a comment in the code to suggest that users probably
do not want to mess with its definition or that its implementation is
especially likely to be changed in the future.

Each of these doc strings refers to `imenu--generic-function':

 imenu-generic-skip-comments-and-strings
 imenu-generic-expression
 imenu-syntax-alist
 imenu-default-create-index-function
 imenu-case-fold-search


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#25776: 24.5; `imenu--generic-function' is not internal
  2017-02-17 17:01 bug#25776: 24.5; `imenu--generic-function' is not internal Drew Adams
@ 2019-07-26 12:50 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 12:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25776

Drew Adams <drew.adams@oracle.com> writes:

> It is a relatively recent mania to name functions and variables using
> `--' to indicate that they are internal.  This function should not be so
> named.  It is referred to in several doc strings.  We do not (should
> not) name functions specially just because we want to indicate that
> users probably do not want to redefine them or that they are especially
> likely to have their implementations changed in the future.  We don't
> name `forward-char' `forward--char' just because it is (truly)
> "internal".

That's not the meaning of -- - it's that other packages probably
shouldn't rely on them.  Everything should rely on `forward-char', so
that's not a very good comparison.

It is slightly eccentric to name a function that's that user-forward as
`imenu--generic-function' is with two dashes...  My preference would be
to not do that, but we do do similar things here and there with some
filter functions and the like that are meant to be values for variables
that can be tweaked, so I don't think this is so abnormal as all that.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-26 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17 17:01 bug#25776: 24.5; `imenu--generic-function' is not internal Drew Adams
2019-07-26 12:50 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.