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

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

bug#5013: Enhancement to hideif.el


From: Lars Ingebrigtsen
Subject: bug#5013: Enhancement to hideif.el
Date: Mon, 29 Feb 2016 13:26:26 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Joe Matarazzo <joe.matarazzo@gmail.com> 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





reply via email to

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