547 |
reporting operation progress. Here is a working example that does |
reporting operation progress. Here is a working example that does |
548 |
nothing useful: |
nothing useful: |
549 |
|
|
550 |
@example |
@smallexample |
551 |
(let ((progress-reporter |
(let ((progress-reporter |
552 |
(make-progress-reporter "Collecting some mana for Emacs..." |
(make-progress-reporter "Collecting mana for Emacs..." |
553 |
0 500))) |
0 500))) |
554 |
(dotimes (k 500) |
(dotimes (k 500) |
555 |
(sit-for 0.01) |
(sit-for 0.01) |
556 |
(progress-reporter-update progress-reporter k)) |
(progress-reporter-update progress-reporter k)) |
557 |
(progress-reporter-done progress-reporter)) |
(progress-reporter-done progress-reporter)) |
558 |
@end example |
@end smallexample |
559 |
|
|
560 |
@defun make-progress-reporter message min-value max-value &optional current-value min-change min-time |
@defun make-progress-reporter message min-value max-value &optional current-value min-change min-time |
561 |
This function creates and returns a @dfn{progress reporter}---an |
This function creates and returns a @dfn{progress reporter}---an |
1296 |
@code{(background-color . @var{color-name})}. These elements specify |
@code{(background-color . @var{color-name})}. These elements specify |
1297 |
just the foreground color or just the background color. |
just the foreground color or just the background color. |
1298 |
|
|
1299 |
@code{(foreground-color . @var{color-name})} is equivalent to |
@code{(foreground-color . @var{color-name})} has the same effect as |
1300 |
@code{(:foreground @var{color-name})}, and likewise for the background. |
@code{(:foreground @var{color-name})}; likewise for the background. |
1301 |
@end itemize |
@end itemize |
1302 |
|
|
1303 |
@item mouse-face |
@item mouse-face |
2757 |
registry name is @samp{JISX0208.1983} for all characters belonging to |
registry name is @samp{JISX0208.1983} for all characters belonging to |
2758 |
the charset @code{japanese-jisx0208}. |
the charset @code{japanese-jisx0208}. |
2759 |
|
|
2760 |
@example |
@smallexample |
2761 |
(set-fontset-font nil 'japanese-jisx0208 '(nil . "JISX0208.1983")) |
(set-fontset-font nil 'japanese-jisx0208 '(nil . "JISX0208.1983")) |
2762 |
@end example |
@end smallexample |
|
|
|
2763 |
@end defun |
@end defun |
2764 |
|
|
2765 |
@defun char-displayable-p char |
@defun char-displayable-p char |
3136 |
Lisp objects as their @code{display} properties are handled |
Lisp objects as their @code{display} properties are handled |
3137 |
separately. Here's a function that illustrates this point: |
separately. Here's a function that illustrates this point: |
3138 |
|
|
3139 |
@example |
@smallexample |
3140 |
(defun foo () |
(defun foo () |
3141 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3142 |
(dotimes (i 5) |
(dotimes (i 5) |
3145 |
(forward-char 1) |
(forward-char 1) |
3146 |
(put-text-property (point) (1+ (point)) 'display string) |
(put-text-property (point) (1+ (point)) 'display string) |
3147 |
(forward-char 1)))) |
(forward-char 1)))) |
3148 |
@end example |
@end smallexample |
3149 |
|
|
3150 |
@noindent |
@noindent |
3151 |
It gives each of the first ten characters in the buffer string |
It gives each of the first ten characters in the buffer string |
3157 |
characters appear as five A's. This function would have the same |
characters appear as five A's. This function would have the same |
3158 |
results: |
results: |
3159 |
|
|
3160 |
@example |
@smallexample |
3161 |
(defun foo () |
(defun foo () |
3162 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3163 |
(dotimes (i 5) |
(dotimes (i 5) |
3165 |
(put-text-property (point) (2+ (point)) 'display string) |
(put-text-property (point) (2+ (point)) 'display string) |
3166 |
(put-text-property (point) (1+ (point)) 'display string) |
(put-text-property (point) (1+ (point)) 'display string) |
3167 |
(forward-char 2)))) |
(forward-char 2)))) |
3168 |
@end example |
@end smallexample |
3169 |
|
|
3170 |
@noindent |
@noindent |
3171 |
This illustrates that what matters is the property value for |
This illustrates that what matters is the property value for |
3261 |
|
|
3262 |
The following expressions are supported: |
The following expressions are supported: |
3263 |
|
|
3264 |
@example |
@smallexample |
3265 |
@group |
@group |
3266 |
@var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{form} |
@var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{form} |
3267 |
@var{num} ::= @var{integer} | @var{float} | @var{symbol} |
@var{num} ::= @var{integer} | @var{float} | @var{symbol} |
3268 |
@var{unit} ::= in | mm | cm | width | height |
@var{unit} ::= in | mm | cm | width | height |
3269 |
|
@end group |
3270 |
|
@group |
3271 |
@var{elem} ::= left-fringe | right-fringe | left-margin | right-margin |
@var{elem} ::= left-fringe | right-fringe | left-margin | right-margin |
3272 |
| scroll-bar | text |
| scroll-bar | text |
3273 |
@var{pos} ::= left | center | right |
@var{pos} ::= left | center | right |
3274 |
@var{form} ::= (@var{num} . @var{expr}) | (@var{op} @var{expr} ...) |
@var{form} ::= (@var{num} . @var{expr}) | (@var{op} @var{expr} ...) |
3275 |
@var{op} ::= + | - |
@var{op} ::= + | - |
3276 |
@end group |
@end group |
3277 |
@end example |
@end smallexample |
3278 |
|
|
3279 |
The form @var{num} specifies a fraction of the default frame font |
The form @var{num} specifies a fraction of the default frame font |
3280 |
height or width. The form @code{(@var{num})} specifies an absolute |
height or width. The form @code{(@var{num})} specifies an absolute |
3332 |
Display @var{string} instead of the text that has this property. |
Display @var{string} instead of the text that has this property. |
3333 |
|
|
3334 |
@item (image . @var{image-props}) |
@item (image . @var{image-props}) |
3335 |
This display specification is an image descriptor (@pxref{Images}). |
This kind of display specification is an image descriptor (@pxref{Images}). |
3336 |
When used as a display specification, it means to display the image |
When used as a display specification, it means to display the image |
3337 |
instead of the text that has the display specification. |
instead of the text that has the display specification. |
3338 |
|
|