2288 |
@end defun |
@end defun |
2289 |
|
|
2290 |
@defun face-differs-from-default-p face &optional frame |
@defun face-differs-from-default-p face &optional frame |
2291 |
This returns @code{t} if the face @var{face} displays differently from |
This returns non-@code{nil} if the face @var{face} displays |
2292 |
the default face. A face is considered to be ``the same'' as the |
differently from the default face. |
|
default face if each attribute is either the same as that of the default |
|
|
face, or unspecified (meaning to inherit from the default). |
|
2293 |
@end defun |
@end defun |
2294 |
|
|
2295 |
@node Auto Faces |
@node Auto Faces |
2875 |
@code{display} property, this feature is available starting in Emacs 21. |
@code{display} property, this feature is available starting in Emacs 21. |
2876 |
|
|
2877 |
Emacs can display a number of different image formats; some of them |
Emacs can display a number of different image formats; some of them |
2878 |
are supported only if particular support libraries are installed on your |
are supported only if particular support libraries are installed on |
2879 |
machine. The supported image formats include XBM, XPM (needing the |
your machine. In some environments, Emacs allows loading image |
2880 |
|
libraries on demand; if so, the variable @code{image-library-alist} |
2881 |
|
can be used to modify the set of known names for these dynamic |
2882 |
|
libraries (though it is not posible to add new image formats). |
2883 |
|
|
2884 |
|
The supported image formats include XBM, XPM (needing the |
2885 |
libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing |
libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing |
2886 |
@code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the |
@code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the |
2887 |
@code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), |
@code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), |
2892 |
@code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}. |
@code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}. |
2893 |
|
|
2894 |
@defvar image-types |
@defvar image-types |
2895 |
|
@vindex image-types |
2896 |
This variable contains a list of those image type symbols that are |
This variable contains a list of those image type symbols that are |
2897 |
supported in the current configuration. |
potentially supported in the current configuration. |
2898 |
|
@emph{Potentially} here means that Emacs knows about the image types, |
2899 |
|
not necessarily that they can be loaded (they could depend on |
2900 |
|
unavailable dynamic libraries, for example). |
2901 |
|
|
2902 |
|
To know which image types are really available, use |
2903 |
|
@code{image-type-available-p}. |
2904 |
|
@end defvar |
2905 |
|
|
2906 |
|
@defvar image-library-alist |
2907 |
|
@vindex image-library-alist |
2908 |
|
This in an alist of image types vs external libraries needed to |
2909 |
|
display them. |
2910 |
|
|
2911 |
|
Each element is a list @code{(@var{IMAGE-TYPE} @var{LIBRARY}...)}, |
2912 |
|
where the car is a supported image format from @code{image-types}, and |
2913 |
|
the rest are strings giving alternate filenames for the corresponding |
2914 |
|
external libraries to load. |
2915 |
|
|
2916 |
|
They are tried in the order they appear on the list; if none of them |
2917 |
|
can be loaded, the running session of Emacs won't support the image |
2918 |
|
type. No entries are needed for @code{pbm} and @code{xbm} images; |
2919 |
|
they're always supported. |
2920 |
|
|
2921 |
|
This variable is ignored if the image libraries are statically linked |
2922 |
|
into Emacs. |
2923 |
@end defvar |
@end defvar |
2924 |
|
|
2925 |
|
@defun image-type-available-p type |
2926 |
|
@findex image-type-available-p |
2927 |
|
|
2928 |
|
This function returns non-nil if image type TYPE is available, i.e., |
2929 |
|
if images of this type can be loaded and displayed in Emacs. TYPE |
2930 |
|
should be one of the types contained in @code{image-types}. |
2931 |
|
|
2932 |
|
For image types whose support libraries are statically linked, this |
2933 |
|
function always returns @code{t}; for other image types, it returns |
2934 |
|
@code{t} if the dynamic library could be loaded, @code{nil} otherwise. |
2935 |
|
@end defun |
2936 |
|
|
2937 |
@menu |
@menu |
2938 |
* Image Descriptors:: How to specify an image for use in @code{:display}. |
* Image Descriptors:: How to specify an image for use in @code{:display}. |
2939 |
* XBM Images:: Special features for XBM format. |
* XBM Images:: Special features for XBM format. |
3197 |
For GIF images, specify image type @code{gif}. Because of the patents |
For GIF images, specify image type @code{gif}. Because of the patents |
3198 |
in the US covering the LZW algorithm, the continued use of GIF format is |
in the US covering the LZW algorithm, the continued use of GIF format is |
3199 |
a problem for the whole Internet; to end this problem, it is a good idea |
a problem for the whole Internet; to end this problem, it is a good idea |
3200 |
for everyone, even outside the US, to stop using GIFS right away |
for everyone, even outside the US, to stop using GIFs right away |
3201 |
(@uref{http://www.burnallgifs.org/}). But if you still want to use |
(@uref{http://www.burnallgifs.org/}). But if you still want to use |
3202 |
them, Emacs can display them. |
them, Emacs can display them. |
3203 |
|
|
3474 |
etc. Emacs uses buttons for the hyper-links in help text and the like. |
etc. Emacs uses buttons for the hyper-links in help text and the like. |
3475 |
|
|
3476 |
A button is essentially a set of properties attached (via text |
A button is essentially a set of properties attached (via text |
3477 |
properties or overlays) to a region of text in an emacs buffer, which |
properties or overlays) to a region of text in an Emacs buffer, which |
3478 |
are called its button properties. @xref{Button Properties}. |
are called its button properties. @xref{Button Properties}. |
3479 |
|
|
3480 |
One of the these properties (@code{action}) is a function, which will |
One of the these properties (@code{action}) is a function, which will |
3482 |
The invoked function may then examine the button and use its other |
The invoked function may then examine the button and use its other |
3483 |
properties as desired. |
properties as desired. |
3484 |
|
|
3485 |
In some ways the emacs button package duplicates functionality offered |
In some ways the Emacs button package duplicates functionality offered |
3486 |
by the widget package (@pxref{Top, , Introduction, widget, The Emacs |
by the widget package (@pxref{Top, , Introduction, widget, The Emacs |
3487 |
Widget Library}), but the button package has the advantage that it is |
Widget Library}), but the button package has the advantage that it is |
3488 |
much faster, much smaller, and much simpler to use (for elisp |
much faster, much smaller, and much simpler to use (for elisp |
3495 |
@menu |
@menu |
3496 |
* Button Properties:: Button properties with special meanings. |
* Button Properties:: Button properties with special meanings. |
3497 |
* Button Types:: Defining common properties for classes of buttons. |
* Button Types:: Defining common properties for classes of buttons. |
3498 |
* Making Buttons:: Adding buttons to emacs buffers. |
* Making Buttons:: Adding buttons to Emacs buffers. |
3499 |
* Manipulating Buttons:: Getting and setting properties of buttons. |
* Manipulating Buttons:: Getting and setting properties of buttons. |
3500 |
* Button Buffer Commands:: Buffer-wide commands and bindings for buttons. |
* Button Buffer Commands:: Buffer-wide commands and bindings for buttons. |
3501 |
* Manipulating Button Types:: |
* Manipulating Button Types:: |
3529 |
|
|
3530 |
@item face |
@item face |
3531 |
@kindex face @r{(button property)} |
@kindex face @r{(button property)} |
3532 |
This is an emacs face controlling how buttons of this type are |
This is an Emacs face controlling how buttons of this type are |
3533 |
displayed; by default this is the @code{button} face. |
displayed; by default this is the @code{button} face. |
3534 |
|
|
3535 |
@item mouse-face |
@item mouse-face |
3536 |
@kindex mouse-face @r{(button property)} |
@kindex mouse-face @r{(button property)} |
3537 |
This is an additional face which controls appearance during |
This is an additional face which controls appearance during |
3538 |
mouse-overs (merged with the usual button face); by default this is |
mouse-overs (merged with the usual button face); by default this is |
3539 |
the usual emacs @code{highlight} face. |
the usual Emacs @code{highlight} face. |
3540 |
|
|
3541 |
@item keymap |
@item keymap |
3542 |
@kindex keymap @r{(button property)} |
@kindex keymap @r{(button property)} |
3553 |
|
|
3554 |
@item help-echo |
@item help-echo |
3555 |
@kindex help-index @r{(button property)} |
@kindex help-index @r{(button property)} |
3556 |
A string displayed by the emacs tool-tip help system; by default, |
A string displayed by the Emacs tool-tip help system; by default, |
3557 |
@code{"mouse-2, RET: Push this button"}. |
@code{"mouse-2, RET: Push this button"}. |
3558 |
|
|
3559 |
@item button |
@item button |
3603 |
Buttons are associated with a region of text, using an overlay or |
Buttons are associated with a region of text, using an overlay or |
3604 |
text-properties to hold button-specific information, all of which are |
text-properties to hold button-specific information, all of which are |
3605 |
initialized from the button's type (which defaults to the built-in |
initialized from the button's type (which defaults to the built-in |
3606 |
button type @code{button}). Like all emacs text, the appearance of |
button type @code{button}). Like all Emacs text, the appearance of |
3607 |
the button is governed by the @code{face} property; by default (via |
the button is governed by the @code{face} property; by default (via |
3608 |
the @code{face} property inherited from the @code{button} button-type) |
the @code{face} property inherited from the @code{button} button-type) |
3609 |
this is a simple underline, like a typical web-page link. |
this is a simple underline, like a typical web-page link. |
3635 |
Insert a button with the label @var{label}. |
Insert a button with the label @var{label}. |
3636 |
@end defun |
@end defun |
3637 |
|
|
3638 |
The following functions are similar, but use emacs text-properties |
The following functions are similar, but use Emacs text-properties |
3639 |
(@pxref{Text Properties}) to hold the button properties, making the |
(@pxref{Text Properties}) to hold the button properties, making the |
3640 |
button actually part of the text instead of being a property of the |
button actually part of the text instead of being a property of the |
3641 |
buffer (using text-properties is usually faster than using overlays, |
buffer (using text-properties is usually faster than using overlays, |
3724 |
@cindex button buffer commands |
@cindex button buffer commands |
3725 |
|
|
3726 |
These are commands and functions for locating and operating on |
These are commands and functions for locating and operating on |
3727 |
buttons in an emacs buffer. |
buttons in an Emacs buffer. |
3728 |
|
|
3729 |
@code{push-button} is the command that a user uses to actually `push' |
@code{push-button} is the command that a user uses to actually `push' |
3730 |
a button, and is bound by default in the button itself to @key{RET} |
a button, and is bound by default in the button itself to @key{RET} |