[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Understanding internal use functions
From: |
Tassilo Horn |
Subject: |
Re: Understanding internal use functions |
Date: |
Mon, 06 May 2019 09:29:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
"Paul W. Rankin" <hello@paulwrankin.com> writes:
Hi Paul,
> How should I decide whether a function is for internal use, as opposed
> to just another function?
>
> A command, i.e. (commandp FUNCTION) -> t, is interactive and so clearly not
> intended for internal use, but I assume this does not mean all non-interactive
> functions should be considered internal use?
Obviously not!
> It seems easier for internal use variables; if the user changes the
> `this--internal-variable' then the program may not work. Functions
> leave me a bit more bewildered... Or should I just think of it in the
> same way, e.g. "don't run this function yourself or you'll break
> things"?
This applies to any function or variable, e.g., activate lisp-mode (a
command) in a JavaScript file, or set auto-mode-alist to "Hello world".
That just doesn't make sense and won't work but of course they are
non-internal nevertheless.
Internal functions/variables usually convey the meaning of "don't rely
on me because I might change whenever my author likes". So it's more a
hint to programmers than to users.
For users, internal functions and variables are usually invisible
because they are never commands or customizable variables.
Bye,
Tassilo