diff options
| author | Eli Zaretskii | 2001-11-14 19:31:18 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-11-14 19:31:18 +0000 |
| commit | 11519a5eb262c968d09e6b024d6d9b0286fc4df3 (patch) | |
| tree | 448a0a34b9a6980859e110e019b7cbbe2a6b2d7f | |
| parent | 9474c847f809ddb438a7c37b7e0dcbd781d9a8ca (diff) | |
| download | emacs-11519a5eb262c968d09e6b024d6d9b0286fc4df3.tar.gz emacs-11519a5eb262c968d09e6b024d6d9b0286fc4df3.zip | |
(Define Images): Fix the documentation of defimage. Suggested by
Kim F. Storm.
| -rw-r--r-- | lispref/display.texi | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lispref/display.texi b/lispref/display.texi index 21af5183018..5c43f534d32 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -2817,15 +2817,19 @@ The function returns @code{nil} if images of this type are not | |||
| 2817 | supported. Otherwise it returns an image descriptor. | 2817 | supported. Otherwise it returns an image descriptor. |
| 2818 | @end defun | 2818 | @end defun |
| 2819 | 2819 | ||
| 2820 | @defmac defimage variable doc &rest specs | 2820 | @defmac defimage symbol specs &optional doc |
| 2821 | @tindex defimage | 2821 | @tindex defimage |
| 2822 | This macro defines @var{variable} as an image name. The second argument, | 2822 | This macro defines @var{symbol} as an image name. The arguments |
| 2823 | @var{doc}, is an optional documentation string. The remaining | 2823 | @var{specs} is a list which specifies how to display the image. |
| 2824 | arguments, @var{specs}, specify alternative ways to display the image. | 2824 | The third argument, @var{doc}, is an optional documentation string. |
| 2825 | 2825 | ||
| 2826 | Each argument in @var{specs} has the form of a property list, and each | 2826 | Each argument in @var{specs} has the form of a property list, and each |
| 2827 | one should specify at least the @code{:type} property and the | 2827 | one should specify at least the @code{:type} property and either the |
| 2828 | @code{:file} property. Here is an example: | 2828 | @code{:file} or the @code{:data} property. The value of @code{:type} |
| 2829 | should be a symbol specifying the image type, the value of | ||
| 2830 | @code{:file} is the file to load the image from, and the value of | ||
| 2831 | @code{:data} is a string containing the actual image data. Here is an | ||
| 2832 | example: | ||
| 2829 | 2833 | ||
| 2830 | @example | 2834 | @example |
| 2831 | (defimage test-image | 2835 | (defimage test-image |
| @@ -2836,9 +2840,9 @@ one should specify at least the @code{:type} property and the | |||
| 2836 | @code{defimage} tests each argument, one by one, to see if it is | 2840 | @code{defimage} tests each argument, one by one, to see if it is |
| 2837 | usable---that is, if the type is supported and the file exists. The | 2841 | usable---that is, if the type is supported and the file exists. The |
| 2838 | first usable argument is used to make an image descriptor which is | 2842 | first usable argument is used to make an image descriptor which is |
| 2839 | stored in the variable @var{variable}. | 2843 | stored in @var{symbol}. |
| 2840 | 2844 | ||
| 2841 | If none of the alternatives will work, then @var{variable} is defined | 2845 | If none of the alternatives will work, then @var{symbol} is defined |
| 2842 | as @code{nil}. | 2846 | as @code{nil}. |
| 2843 | @end defmac | 2847 | @end defmac |
| 2844 | 2848 | ||