[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[el-search] How to search string excluding docstring?
From: |
Chunyang Xu |
Subject: |
[el-search] How to search string excluding docstring? |
Date: |
Mon, 25 Dec 2017 18:27:24 +0800 |
User-agent: |
mu4e 0.9.18; emacs 27.0.50 |
Hi Michael Heerdegen and other Emacs users,
For example, with the following contents in a buffer
(defun foo ()
"foo docstring"
(message "foo string"))
(string "foo") matches both "foo docstring" and "foo string", I want a
way to exclude the docstring, by "docstring", I just mean the string
being checking should not be the fourth element in
(defun _ _ docstring . _)
I am thinking a pattern like
(and (pred stringp) (guard (not (docstring-p))) (string "foo"))
but I have no idea how to define 'docstring-p'.
Any tips?
- [el-search] How to search string excluding docstring?,
Chunyang Xu <=