How do I check if a string is already in a list in Emacs Lisp? I need to check if a certain path string is already in exec-path, and then add it to that list if it’s not.
How do I check if a string is already in a list in Emacs
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The function
add-to-listwill check automatically before addingwill result in
aequal to (4 1 2 3)From Emacs 26 C-h f
add-to-list: