Subject: Re: bug#5013: Enhancement to hideif.el

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 29 Feb 2016 13:26:26 +1100

Joe Matarazzo <[email-masked]> 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