This function return the default X device for resourcing. This is the first-created X device that still exists.
This function retrieves a resource value from the X resource manager.
- The first arg is the name of the resource to retrieve, such as ‘"font"’.
- The second arg is the class of the resource to retrieve, like ‘"Font"’.
- The third arg should be one of the symbols
string,integer,natnum, orboolean, specifying the type of object that the database is searched for.- The fourth arg is the locale to search for the resources on, and can currently be a buffer, a frame, a device, or the symbol
global. If omitted, it defaults toglobal.- The fifth arg is the device to search for the resources on. (The resource database for a particular device is constructed by combining non-device- specific resources such any command-line resources specified and any app-defaults files found [or the fallback resources supplied by SXEmacs, if no app-defaults file is found] with device-specific resources such as those supplied using ‘xrdb’.) If omitted, it defaults to the device of locale, if a device can be derived (i.e. if locale is a frame or device), and otherwise defaults to the value of
default-x-device.- The sixth arg noerror, if non-
nil, means do not signal an error if a bogus resource specification was retrieved (e.g. if a non-integer was given when an integer was requested). In this case, a warning is issued instead.The resource names passed to this function are looked up relative to the locale.
If you want to search for a subresource, you just need to specify the resource levels in name and class. For example, name could be ‘"modeline.attributeFont"’, and class ‘"Face.AttributeFont"’.
Specifically,
- If locale is a buffer, a call
(x-get-resource "foreground" "Foreground" 'stringsome-buffer)is an interface to a C call something like
XrmGetResource (db, "sxemacs.buffer.buffer-name.foreground", "Emacs.EmacsLocaleType.EmacsBuffer.Foreground", "String");- If locale is a frame, a call
(x-get-resource "foreground" "Foreground" 'stringsome-frame)is an interface to a C call something like
XrmGetResource (db, "sxemacs.frame.frame-name.foreground", "Emacs.EmacsLocaleType.EmacsFrame.Foreground", "String");- If locale is a device, a call
(x-get-resource "foreground" "Foreground" 'stringsome-device)is an interface to a C call something like
XrmGetResource (db, "sxemacs.device.device-name.foreground", "Emacs.EmacsLocaleType.EmacsDevice.Foreground", "String");- If locale is the symbol
global, a call(x-get-resource "foreground" "Foreground" 'string 'global)is an interface to a C call something like
XrmGetResource (db, "sxemacs.foreground", "Emacs.Foreground", "String");Note that for
global, no prefix is added other than that of the application itself; thus, you can use this locale to retrieve arbitrary application resources, if you really want to.The returned value of this function is
nilif the queried resource is not found. If type isstring, a string is returned, and if it isinteger, an integer is returned. If type isboolean, then the returned value is the list(t)for true,(nil)for false, and isnilto mean “unspecified”.
This function adds a resource to the resource database for device. resource-line specifies the resource to add and should be a standard resource specification.
This variable holds The X application class of the SXEmacs process. This controls, among other things, the name of the “app-defaults” file that SXEmacs will use. For changes to this variable to take effect, they must be made before the connection to the X server is initialized, that is, this variable may only be changed before SXEmacs is dumped, or by setting it in the file lisp/term/x-win.el.
By default, this variable is
nilat startup. When the connection to the X server is first initialized, the X resource database will be consulted and the value will be set according to whether any resources are found for the application class “SXEmacs”.