From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: customize hideshow.el? Date: Sun, 13 Aug 2017 11:46:55 -0500 Message-ID: <861sofza80.fsf@stephe-leake.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502642841 22033 195.159.176.226 (13 Aug 2017 16:47:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Aug 2017 16:47:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 13 18:47:16 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dgw2l-0005Q8-Dk for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2017 18:47:15 +0200 Original-Received: from localhost ([::1]:39915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgw2r-00030j-QP for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2017 12:47:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgw2f-0002zE-BV for emacs-devel@gnu.org; Sun, 13 Aug 2017 12:47:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgw2a-0004wb-Fd for emacs-devel@gnu.org; Sun, 13 Aug 2017 12:47:09 -0400 Original-Received: from smtp145.ord.emailsrvr.com ([173.203.6.145]:57609) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgw2a-0004rY-Ar for emacs-devel@gnu.org; Sun, 13 Aug 2017 12:47:04 -0400 Original-Received: from smtp27.relay.ord1a.emailsrvr.com (localhost [127.0.0.1]) by smtp27.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id A58D8C00A2 for ; Sun, 13 Aug 2017 12:46:57 -0400 (EDT) X-Auth-ID: board-president@tomahawk-creek-hoa.com Original-Received: by smtp27.relay.ord1a.emailsrvr.com (Authenticated sender: board-president-AT-tomahawk-creek-hoa.com) with ESMTPSA id 5BE90C007A for ; Sun, 13 Aug 2017 12:46:57 -0400 (EDT) X-Sender-Id: board-president@tomahawk-creek-hoa.com Original-Received: from Takver4 (76-218-37-33.lightspeed.kscymo.sbcglobal.net [76.218.37.33]) (using TLSv1.2 with cipher AES128-GCM-SHA256) by 0.0.0.0:587 (trex/5.7.12); Sun, 13 Aug 2017 12:46:57 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 173.203.6.145 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217512 Archived-At: I'd like to customize hideshow.el to display the first and last line in each hidden block. This makes sense (at least to me) for languages like Ada. For example, suppose I have an "if then else" statement nested in a block: declare begin if then elsif then else end if; exception end; But I realize the declare block is only needed in the first branch of the if, so I'd like to change this to: if then declare begin exception end; elsif then else end if; If all the code fits in one window, this is not hard. But if the "if then else" is long, I'd like to hide it, so I can easily delete the "declare begin" and "exception end". But I'd like to be sure where the beginning and end of the "if then else" is, so I don't accidently delete part of it: declare begin if then ... end if; exception end; However, hideshow.el, without any customizations, does this: declare begin...exception end; I've looked into the hooks in hide-show; I can set hs-adjust-block-beginning to get this: declare begin if then...exception end; but there is no corresponding hs-adjust-block-end hook. Before I start trying to add hs-adjust-block-end, I'm looking for advice. Is there any way to use the existing hooks to get what I want? Are there other modes like hideshow.el that are closer to what I want? Anyone else want what I want? -- -- Stephe