diff options
| author | Stefan Monnier | 2007-08-25 20:11:09 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-08-25 20:11:09 +0000 |
| commit | e60c4e15efd282dfd4cf94af1eff96f540fe586a (patch) | |
| tree | c1e07e482c5204b92c8ce135b2f2d029180a4df9 /src | |
| parent | 3a44b2ae7a16ee3cb5b5f706d6e80c53c801a7f2 (diff) | |
| download | emacs-e60c4e15efd282dfd4cf94af1eff96f540fe586a.tar.gz emacs-e60c4e15efd282dfd4cf94af1eff96f540fe586a.zip | |
(Finvisible_p): New function.
(syms_of_xdisp): defsubr it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5f2a7d820cd..b775844bf3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xdisp.c (Finvisible_p): New function. | ||
| 4 | (syms_of_xdisp): defsubr it. | ||
| 5 | |||
| 1 | 2007-08-24 Juanma Barranquero <lekktu@gmail.com> | 6 | 2007-08-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * image.c (syms_of_image) <image-library-alist, cross-disabled-images>: | 8 | * image.c (syms_of_image) <image-library-alist, cross-disabled-images>: |
diff --git a/src/xdisp.c b/src/xdisp.c index b1a837b799a..da33b05c4c5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18435,6 +18435,27 @@ invisible_p (propval, list) | |||
| 18435 | return 0; | 18435 | return 0; |
| 18436 | } | 18436 | } |
| 18437 | 18437 | ||
| 18438 | DEFUN ("invisible-p", Finvisible_p, Sinvisible_p, 1, 1, 0, | ||
| 18439 | doc: /* Non-nil if the property makes the text invisible. | ||
| 18440 | POS-OR-PROP can be a marker or number, in which case it is taken to be | ||
| 18441 | a position in the current buffer and the value of the `invisible' property | ||
| 18442 | is checked; or it can be some other value, which is then presumed to be the | ||
| 18443 | value of the `invisible' property of the text of interest. | ||
| 18444 | The non-nil value returned can be t for truly invisible text or something | ||
| 18445 | else if the text is replaced by an ellipsis. */) | ||
| 18446 | (pos_or_prop) | ||
| 18447 | Lisp_Object pos_or_prop; | ||
| 18448 | { | ||
| 18449 | Lisp_Object prop = | ||
| 18450 | (NATNUMP (pos_or_prop) || MARKERP (pos_or_prop)) | ||
| 18451 | ? Fget_char_property (pos_or_prop, Qinvisible, Qnil) | ||
| 18452 | : pos_or_prop; | ||
| 18453 | int invis = TEXT_PROP_MEANS_INVISIBLE (prop); | ||
| 18454 | return (invis == 0 ? Qnil | ||
| 18455 | : invis == 1 ? Qt | ||
| 18456 | : make_number (invis)); | ||
| 18457 | } | ||
| 18458 | |||
| 18438 | /* Calculate a width or height in pixels from a specification using | 18459 | /* Calculate a width or height in pixels from a specification using |
| 18439 | the following elements: | 18460 | the following elements: |
| 18440 | 18461 | ||
| @@ -23806,6 +23827,7 @@ syms_of_xdisp () | |||
| 23806 | defsubr (&Slookup_image_map); | 23827 | defsubr (&Slookup_image_map); |
| 23807 | #endif | 23828 | #endif |
| 23808 | defsubr (&Sformat_mode_line); | 23829 | defsubr (&Sformat_mode_line); |
| 23830 | defsubr (&Sinvisible_p); | ||
| 23809 | 23831 | ||
| 23810 | staticpro (&Qmenu_bar_update_hook); | 23832 | staticpro (&Qmenu_bar_update_hook); |
| 23811 | Qmenu_bar_update_hook = intern ("menu-bar-update-hook"); | 23833 | Qmenu_bar_update_hook = intern ("menu-bar-update-hook"); |