[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home f
From: |
Michael Albinus |
Subject: |
Re: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home for thread-related Lisp functions |
Date: |
Mon, 03 Sep 2018 12:08:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> It would work, of course. But I'm a finicky German :-) `featurep' is the
>> default way in Emacs to check, whether a feature exist, so I've done it
>> this way.
>
> Actually, fboundp is a much more common way to perform such tests,
> especially since it can silence some warnings at the same occasion.
> (featurep 'xemacs) is an important exception, tho.
Currently, we have `features', which gives us the feature symbols of
loaded packages. What we would need are the configured featurea of
Emacs. What about this:
--8<---------------cut here---------------start------------->8---
(defconst configured-features
(mapcar
(lambda (feat) (intern (downcase feat)))
(split-string system-configuration-features))
"A list of symbols which are the configured features of the executing Emacs.")
(defun configured-feature-p (feature)
"Return t if Emacs is configured with FEATURE."
(and (member feature configured-features) t))
--8<---------------cut here---------------end--------------->8---
I could use then (configured-feature-p 'threads) in order to know
whether Emacs has been configured --with-threads, explicitly or implicitly.
> Stefan
Best regards, Michael.
- Re: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home for thread-related Lisp functions,
Michael Albinus <=