help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [el-search] How to search string excluding docstring?


From: Emanuel Berg
Subject: Re: [el-search] How to search string excluding docstring?
Date: Mon, 25 Dec 2017 15:08:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Chunyang Xu wrote:

> It almost solves my problem via:
>
>   (and (pred stringp)
>        (guard (not (eq 'font-lock-doc-face (get-char-property (point) 
> 'face))))
>        (string "foo"))
>
> but it doesn't work for files which is not
> already opened, I guess it is because
> font-lock-mode is only active when I open the
> file.

Font lock is run by the idle timer. So if you
are productive enough and do things all the
time, you won't get it :)

If the file isn't opened, it is just a bunch of
data. Font lock isn't encoded in the files,
thanks heaven.

You will have to make a loop that opens all
files... perhaps it'll be a challenge to have
font loke come to life each time tho?

> Besides I am still interested in using
> "pattern match" to solve the issue. I think
> it is possible though I don't know how yet.

Pattern match, like they have for arguments in
Erlang and SML? There are Lisp modules for
that. Still, I'd start with finding out how
font lock does it...

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]