From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/resources.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 devdocs/elisp/resources.html (limited to 'devdocs/elisp/resources.html') diff --git a/devdocs/elisp/resources.html b/devdocs/elisp/resources.html new file mode 100644 index 00000000..803c5530 --- /dev/null +++ b/devdocs/elisp/resources.html @@ -0,0 +1,26 @@ +

X Resources

This section describes some of the functions and variables for querying and using X resources, or their equivalent on your operating system. See X Resources in The GNU Emacs Manual, for more information about X resources.

Function: x-get-resource attribute class &optional component subclass +
+

The function x-get-resource retrieves a resource value from the X Window defaults database.

Resources are indexed by a combination of a key and a class. This function searches using a key of the form ‘instance.attribute’ (where instance is the name under which Emacs was invoked), and using ‘Emacs.class’ as the class.

The optional arguments component and subclass add to the key and the class, respectively. You must specify both of them or neither. If you specify them, the key is ‘instance.component.attribute’, and the class is ‘Emacs.class.subclass’.

+
+
Variable: x-resource-class +

This variable specifies the application name that x-get-resource should look up. The default value is "Emacs". You can examine X resources for other application names by binding this variable to some other string, around a call to x-get-resource.

+
Variable: x-resource-name +

This variable specifies the instance name that x-get-resource should look up. The default value is the name Emacs was invoked with, or the value specified with the ‘-name’ or ‘-rn’ switches.

+

To illustrate some of the above, suppose that you have the line:

xterm.vt100.background: yellow
+
+

in your X resources file (whose name is usually ~/.Xdefaults or ~/.Xresources). Then:

(let ((x-resource-class "XTerm") (x-resource-name "xterm"))
+  (x-get-resource "vt100.background" "VT100.Background"))
+     ⇒ "yellow"
+
+
(let ((x-resource-class "XTerm") (x-resource-name "xterm"))
+  (x-get-resource "background" "VT100" "vt100" "Background"))
+     ⇒ "yellow"
+
+
Variable: inhibit-x-resources +

If this variable is non-nil, Emacs does not look up X resources, and X resources do not have any effect when creating new frames.

+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Resources.html +

+
-- cgit v1.2.3