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

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

Re: Iterating over all docstrings in a Lisp buffer


From: Sebastian Wiesner
Subject: Re: Iterating over all docstrings in a Lisp buffer
Date: Tue, 24 Jun 2014 17:41:39 +0200

Am 24.06.2014 um 17:23 schrieb Thorsten Jolitz <tjolitz@gmail.com>:

> Sebastian Wiesner <swiesner@lunaryorn.com> writes:
> 
>> Hello,
>> 
>> how would I iterate over all function/macro/variable docstrings in an
>> Emacs Lisp buffer?
>> 
>> The idea is to write a command that automatically re-wraps all
>> docstrings in the current buffer.  I’d like to use this as part of a
>> test suite to automatically check whether contributed code adheres to
>> the Emacs Lisp style guide.
> 
> Here is a link to a function that cycles docstring visibility and thus
> should iterate over the whole buffer:
> 
> ,----
> | 
> http://www.prodevtips.com/2013/06/15/hiding-clojure-and-elisp-docstrings-in-emacs/
> `——

As far as I can see this function iterates over all multi-line strings in a 
buffer.  That would not be safe to use for the aforementioned purpose:  There 
might be other multi-line strings in a buffer that should not be re-wrapped, 
because the line breaks therein might be significant.

I’m more looking for a solution that takes `doc-string-elt’ property of the 
current definition into account.

Thanks for your input, though

> 
> -- 
> cheers,
> Thorsten
> 
> 




reply via email to

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