Mercurial > emacs
comparison src/fns.c @ 44066:d0bef01f3cb3
(Ffeaturep): Allow subfeature to be a list (test using
Fmember rather than Fmemq).
(Fprovide): Check that subfeatures is a list.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 21 Mar 2002 12:19:02 +0000 |
parents | fd83ec62a495 |
children | 61c15819e528 |
comparison
equal
deleted
inserted
replaced
44065:fca68830d4e0 | 44066:d0bef01f3cb3 |
---|---|
3043 { | 3043 { |
3044 register Lisp_Object tem; | 3044 register Lisp_Object tem; |
3045 CHECK_SYMBOL (feature); | 3045 CHECK_SYMBOL (feature); |
3046 tem = Fmemq (feature, Vfeatures); | 3046 tem = Fmemq (feature, Vfeatures); |
3047 if (!NILP (tem) && !NILP (subfeature)) | 3047 if (!NILP (tem) && !NILP (subfeature)) |
3048 tem = Fmemq (subfeature, Fget (feature, Qsubfeatures)); | 3048 tem = Fmember (subfeature, Fget (feature, Qsubfeatures)); |
3049 return (NILP (tem)) ? Qnil : Qt; | 3049 return (NILP (tem)) ? Qnil : Qt; |
3050 } | 3050 } |
3051 | 3051 |
3052 DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, | 3052 DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, |
3053 doc: /* Announce that FEATURE is a feature of the current Emacs. | 3053 doc: /* Announce that FEATURE is a feature of the current Emacs. |
3056 (feature, subfeatures) | 3056 (feature, subfeatures) |
3057 Lisp_Object feature, subfeatures; | 3057 Lisp_Object feature, subfeatures; |
3058 { | 3058 { |
3059 register Lisp_Object tem; | 3059 register Lisp_Object tem; |
3060 CHECK_SYMBOL (feature); | 3060 CHECK_SYMBOL (feature); |
3061 CHECK_LIST (subfeatures); | |
3061 if (!NILP (Vautoload_queue)) | 3062 if (!NILP (Vautoload_queue)) |
3062 Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue); | 3063 Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue); |
3063 tem = Fmemq (feature, Vfeatures); | 3064 tem = Fmemq (feature, Vfeatures); |
3064 if (NILP (tem)) | 3065 if (NILP (tem)) |
3065 Vfeatures = Fcons (feature, Vfeatures); | 3066 Vfeatures = Fcons (feature, Vfeatures); |