From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: hideshow docstring in elisp or common lisp code Date: Mon, 12 Nov 2018 19:34:05 -0800 (PST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1542079983 4136 195.159.176.226 (13 Nov 2018 03:33:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2018 03:33:03 +0000 (UTC) To: Mirko Vukovic , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 13 04:32:58 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMPRi-0000xN-KQ for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2018 04:32:58 +0100 Original-Received: from localhost ([::1]:51759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMPTo-0007Vr-PS for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2018 22:35:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMPTF-0007Vl-Qu for help-gnu-emacs@gnu.org; Mon, 12 Nov 2018 22:34:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMPT7-0004p4-2p for help-gnu-emacs@gnu.org; Mon, 12 Nov 2018 22:34:30 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:45226) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gMPT4-0004m8-Hx for help-gnu-emacs@gnu.org; Mon, 12 Nov 2018 22:34:23 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAD3TTvN086656; Tue, 13 Nov 2018 03:34:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=eoJglA8ZJmmryhkgsw68neihpUJnLx5N3nHRj4IfJYQ=; b=RSwmvlcd3rXCDs1pRDFvkZz20o9d1ZFbpggdcCsrJ6ejjmduAbvIFahdsaTszg7dv5oh EnObGrMedGZu6ajeGTCXlrkOh4CbhxZONxMpCsb3MgW4qArsKhOfCgdwocZBJHbeOal7 19g5l7DA1h+MCgtgwPxWft/IwwHQxQjM3g6RTTZ1DEIUG98Mi67eC2vbUTQLa3pQoUds qKcjga0hM4UweWtJap8xCJfX5zJb6PE3/q7b6XWMPafYq3FclFvqJaGwZgYyAxlOjQSC LpDiU4lN0dS7V8LwvR0KtQtaZVbseYfLRDL0c8KDe9DgZv06eW6Y0OCEnKVQU0B2Qftm ww== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2nnw6eg14f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 03:34:13 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wAD3Y6wN019353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 03:34:07 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wAD3Y6CI018988; Tue, 13 Nov 2018 03:34:06 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4756.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9075 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130031 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.78 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118660 Archived-At: > I would like to hide/show docstrings of my common lisp > code. Has that been defined in some hideshow package? > If not I'll give it a shot, initially for defuns. This is all you need to do, but you need these 3 libraries: `zones.el', `highlight.el', `isearch-prop.el'. 1. Create zones of all of the doc strings, fontifying the full buffer. `M-x zz-create-face-zones font-lock-doc-face' 2. Toggle invisibility of the zones. `M-x isearchp-toggle-zones-invisible' Step 1 fontifies the full buffer, then creates a sequence of non-overlapping buffer zones for the doc strings. Step 2 makes the zones invisible. Use the same toggle command, to make them visible. I defined this stuff for Elisp code, but I imagine it works also for Common Lisp code. You can get all 3 libraries from Emacs Wiki. After the latest version of `zones.el' gets added to GNU ELPA (soon, I think) you can get it (but not the others) also from GNU ELPA. https://www.emacswiki.org/emacs?action=3Delisp-area;context=3D0