From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#5013: Enhancement to hideif.el Date: Mon, 29 Feb 2016 13:26:26 +1100 Message-ID: <87a8mk45gt.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456712842 27495 80.91.229.3 (29 Feb 2016 02:27:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 02:27:22 +0000 (UTC) Cc: 5013@debbugs.gnu.org To: Joe Matarazzo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 03:27:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaDYE-0006eG-N0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 03:27:10 +0100 Original-Received: from localhost ([::1]:33530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaDYD-0005KZ-Vx for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2016 21:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaDY9-0005JT-K3 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 21:27:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaDY6-000552-Cv for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 21:27:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaDY6-00054w-9N for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 21:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaDY6-0006KS-20 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 21:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 02:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 5013-submit@debbugs.gnu.org id=B5013.145671281524314 (code B ref 5013); Mon, 29 Feb 2016 02:27:01 +0000 Original-Received: (at 5013) by debbugs.gnu.org; 29 Feb 2016 02:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:51134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaDXz-0006K6-30 for submit@debbugs.gnu.org; Sun, 28 Feb 2016 21:26:55 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:43216) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaDXx-0006Jz-OE for 5013@debbugs.gnu.org; Sun, 28 Feb 2016 21:26:54 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaDXa-0007vE-2U; Mon, 29 Feb 2016 03:26:30 +0100 In-Reply-To: (Joe Matarazzo's message of "Fri, 13 Nov 2009 13:23:55 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aaDXa-0007vE-2U MailScanner-NULL-Check: 1457317591.01624@xUY2DeyBaUSy3W9rRrVaRg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114061 Archived-At: Joe Matarazzo writes: > (defun hif-ifdef-to-endif () > - "If positioned at #ifX or #else form, skip to corresponding #endif." > + "If positioned at #ifX, #elif, or #else form, skip to corresponding #endif." > ;; (message "hif-ifdef-to-endif at %d" (point)) (sit-for 1) > (hif-find-next-relevant) > (cond ((hif-looking-at-ifX) > (hif-ifdef-to-endif) ; find endif of nested if > (hif-ifdef-to-endif)) ; find outer endif or else > + ((hif-looking-at-elif) > + (hif-ifdef-to-endif)) > ((hif-looking-at-else) > (hif-ifdef-to-endif)) ; find endif following else > ((hif-looking-at-endif) > @@ -585,11 +590,14 @@ > (cond ((hif-looking-at-endif) > (hif-endif-to-ifdef) ; find beginning of nested if > (hif-endif-to-ifdef)) ; find beginning of outer if or else > + ((hif-looking-at-elif) > + (hif-endif-to-ifdef)) > ((hif-looking-at-else) > (hif-endif-to-ifdef)) > ((hif-looking-at-ifX) > 'done) > - (t))) ; never gets here > + (t > + (error "Mismatched #endif")))) ; never gets here This looks very much like the code currently in hideif.el, so I guess this was applied already? Closing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no