From: Sebastian Wiesner <swiesner@lunaryorn.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Iterating over all docstrings in a Lisp buffer
Date: Tue, 24 Jun 2014 17:41:39 +0200 [thread overview]
Message-ID: <D190DB30-3CB9-4E44-A538-02BC375A2E98@lunaryorn.com> (raw)
In-Reply-To: <87d2dytjq4.fsf@gmail.com>
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
>
>
next prev parent reply other threads:[~2014-06-24 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 15:16 Iterating over all docstrings in a Lisp buffer Sebastian Wiesner
2014-06-24 15:23 ` Thorsten Jolitz
2014-06-24 15:41 ` Sebastian Wiesner [this message]
2014-06-24 16:51 ` Michael Heerdegen
2014-06-24 19:49 ` Sebastian Wiesner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D190DB30-3CB9-4E44-A538-02BC375A2E98@lunaryorn.com \
--to=swiesner@lunaryorn.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tjolitz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).