diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/button-types.html | |
new repository
Diffstat (limited to 'devdocs/elisp/button-types.html')
| -rw-r--r-- | devdocs/elisp/button-types.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/button-types.html b/devdocs/elisp/button-types.html new file mode 100644 index 00000000..99bcd4bc --- /dev/null +++ b/devdocs/elisp/button-types.html @@ -0,0 +1,10 @@ + <h4 class="subsection">Button Types</h4> <p>Every button has a <em>button type</em>, which defines default values for the button’s properties. Button types are arranged in a hierarchy, with specialized types inheriting from more general types, so that it’s easy to define special-purpose types of buttons for specific tasks. </p> <dl> <dt id="define-button-type">Function: <strong>define-button-type</strong> <em>name &rest properties</em> +</dt> <dd> +<p>Define a button type called <var>name</var> (a symbol). The remaining arguments form a sequence of <var>property value</var> pairs, specifying default property values for buttons with this type (a button’s type may be set by giving it a <code>type</code> property when creating the button, using the <code>:type</code> keyword argument). </p> <p>In addition, the keyword argument <code>:supertype</code> may be used to specify a button-type from which <var>name</var> inherits its default property values. Note that this inheritance happens only when <var>name</var> is defined; subsequent changes to a supertype are not reflected in its subtypes. </p> +</dd> +</dl> <p>Using <code>define-button-type</code> to define default properties for buttons is not necessary—buttons without any specified type use the built-in button-type <code>button</code>—but it is encouraged, since doing so usually makes the resulting code clearer and more efficient. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Button-Types.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Button-Types.html</a> + </p> +</div> |
