diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f9e8491ca4e..7ef95dfcd63 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3838,6 +3838,8 @@ display_string (w, vpos, string, length, hpos, truncate, | |||
| 3838 | /* This is like a combination of memq and assq. | 3838 | /* This is like a combination of memq and assq. |
| 3839 | Return 1 if PROPVAL appears as an element of LIST | 3839 | Return 1 if PROPVAL appears as an element of LIST |
| 3840 | or as the car of an element of LIST. | 3840 | or as the car of an element of LIST. |
| 3841 | If PROPVAL is a list, compare each element against LIST | ||
| 3842 | in that way, and return 1 if any element of PROPVAL is found in LIST. | ||
| 3841 | Otherwise return 0. | 3843 | Otherwise return 0. |
| 3842 | This function cannot quit. */ | 3844 | This function cannot quit. */ |
| 3843 | 3845 | ||
| @@ -3846,21 +3848,40 @@ invisible_p (propval, list) | |||
| 3846 | register Lisp_Object propval; | 3848 | register Lisp_Object propval; |
| 3847 | Lisp_Object list; | 3849 | Lisp_Object list; |
| 3848 | { | 3850 | { |
| 3849 | register Lisp_Object tail; | 3851 | register Lisp_Object tail, proptail; |
| 3850 | for (tail = list; CONSP (tail); tail = Fcdr (tail)) | 3852 | for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) |
| 3851 | { | 3853 | { |
| 3852 | register Lisp_Object tem; | 3854 | register Lisp_Object tem; |
| 3853 | tem = Fcar (tail); | 3855 | tem = XCONS (tail)->car; |
| 3854 | if (EQ (propval, tem)) | 3856 | if (EQ (propval, tem)) |
| 3855 | return 1; | 3857 | return 1; |
| 3856 | if (CONSP (tem) && EQ (propval, XCONS (tem)->car)) | 3858 | if (CONSP (tem) && EQ (propval, XCONS (tem)->car)) |
| 3857 | return 1; | 3859 | return 1; |
| 3858 | } | 3860 | } |
| 3861 | if (CONSP (propval)) | ||
| 3862 | for (proptail = propval; CONSP (proptail); | ||
| 3863 | proptail = XCONS (proptail)->cdr) | ||
| 3864 | { | ||
| 3865 | Lisp_Object propelt; | ||
| 3866 | propelt = XCONS (proptail)->car; | ||
| 3867 | for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) | ||
| 3868 | { | ||
| 3869 | register Lisp_Object tem; | ||
| 3870 | tem = XCONS (tail)->car; | ||
| 3871 | if (EQ (propelt, tem)) | ||
| 3872 | return 1; | ||
| 3873 | if (CONSP (tem) && EQ (propelt, XCONS (tem)->car)) | ||
| 3874 | return 1; | ||
| 3875 | } | ||
| 3876 | } | ||
| 3859 | return 0; | 3877 | return 0; |
| 3860 | } | 3878 | } |
| 3861 | 3879 | ||
| 3862 | /* Return 1 if PROPVAL appears as the car of an element of LIST | 3880 | /* Return 1 if PROPVAL appears as the car of an element of LIST |
| 3863 | and the cdr of that element is non-nil. | 3881 | and the cdr of that element is non-nil. |
| 3882 | If PROPVAL is a list, check each element of PROPVAL in that way, | ||
| 3883 | and the first time some element is found, | ||
| 3884 | return 1 if the cdr of that element is non-nil. | ||
| 3864 | Otherwise return 0. | 3885 | Otherwise return 0. |
| 3865 | This function cannot quit. */ | 3886 | This function cannot quit. */ |
| 3866 | 3887 | ||
| @@ -3869,14 +3890,28 @@ invisible_ellipsis_p (propval, list) | |||
| 3869 | register Lisp_Object propval; | 3890 | register Lisp_Object propval; |
| 3870 | Lisp_Object list; | 3891 | Lisp_Object list; |
| 3871 | { | 3892 | { |
| 3872 | register Lisp_Object tail; | 3893 | register Lisp_Object tail, proptail; |
| 3873 | for (tail = list; CONSP (tail); tail = Fcdr (tail)) | 3894 | for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) |
| 3874 | { | 3895 | { |
| 3875 | register Lisp_Object tem; | 3896 | register Lisp_Object tem; |
| 3876 | tem = Fcar (tail); | 3897 | tem = XCONS (tail)->car; |
| 3877 | if (CONSP (tem) && EQ (propval, XCONS (tem)->car)) | 3898 | if (CONSP (tem) && EQ (propval, XCONS (tem)->car)) |
| 3878 | return ! NILP (XCONS (tem)->cdr); | 3899 | return ! NILP (XCONS (tem)->cdr); |
| 3879 | } | 3900 | } |
| 3901 | if (CONSP (propval)) | ||
| 3902 | for (proptail = propval; CONSP (proptail); | ||
| 3903 | proptail = XCONS (proptail)->cdr) | ||
| 3904 | { | ||
| 3905 | Lisp_Object propelt; | ||
| 3906 | propelt = XCONS (proptail)->car; | ||
| 3907 | for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) | ||
| 3908 | { | ||
| 3909 | register Lisp_Object tem; | ||
| 3910 | tem = XCONS (tail)->car; | ||
| 3911 | if (CONSP (tem) && EQ (propelt, XCONS (tem)->car)) | ||
| 3912 | return ! NILP (XCONS (tem)->cdr); | ||
| 3913 | } | ||
| 3914 | } | ||
| 3880 | return 0; | 3915 | return 0; |
| 3881 | } | 3916 | } |
| 3882 | 3917 | ||