Subject: bug#77898: 31.0.50; arc-mode: Split PKZIP archive signature not recognized

From: Eli Zaretskii <[email-masked]>
Date: Sat, 19 Apr 2025 16:07:59 +0300

> Date: Sat, 19 Apr 2025 14:31:27 +0200
> Cc: [email-masked]
> From: Jens Schmidt <[email-masked]>
> 
> As an aside, how would you add a comment to the first branch of a
> `cond' if you would like to keep the branches aligned to the *end*
> of the `cond' keyword?  I usually do these as follows:
> 
>     (cond ;; See APPNOTE.txt (version 6.3.10) from PKWARE for the zip
>           ;; file signatures:
>           ;; - PK\003\004 == 0x04034b50: local file header signature
>           ;;   (section 4.3.7)
>           ;; - PK\007\010 == 0x08074b50 (followed by local header):
>           ;;   spanned/split archive signature (section 8.5.3)
>           ;; - PK00 == 0x30304b50 (followed by local header): temporary
>           ;;   spanned/split archive signature (section 8.5.4)
>           ((looking-at "\\(?:PK\007\010\\|PK00\\)?[P]K\003\004") 'zip)

Something like below, perhaps?

    (cond (looking-at
           ;; Comment
           "PATTERN"

Or even

    ;;    See APPNOTE.txt
    (cond ((looking-at "\\(?:PK\007\010\\|PK00\\)?[P]K\003\004") 'zip)