GNU bug report logs - #25360
File mode specification errors during building

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Wed, 4 Jan 2017 20:29:02 UTC

Severity: normal

Fixed in version 26.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #78 received at 25360 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: Glenn Morris <rgm <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 25360 <at> debbugs.gnu.org
Subject: Re: bug#25360: File mode specification errors during building
Date: Tue, 17 Jan 2017 20:11:45 -0500
phillip.lord <at> russet.org.uk (Phillip Lord) writes:

> Glenn Morris <rgm <at> gnu.org> writes:
>
>> npostavs <at> users.sourceforge.net wrote:
>>
>>> Using insert-file-contents instead of file-file-noselect seems to fix it
>>> for me:
>>
>> That sounds like a good change anyway. (I forget, does this respect
>> "coding:"? Does this even matter in this case?)
>
> I think, no, it doesn't respect coding, but that it doesn't matter.

I believe it does respect "coding:" in general (at least it looks like
there are some comments to that effect in Finsert_file_contents), but
indeed it doesn't matter in this case because we're let-binding
`coding-system-for-read' which overrides that.

>
>>
>> (But it still seems like a potential problem to me if functions that used to
>> be available early in the build no longer are.)
>
> It shouldn't be, if they are not being called.
>
> Anyway, the cause of the error in this case is this line in files.el.
>
> 	 (assoc-default nil magic-fallback-mode-alist
> 		(lambda (re _dummy)
> 		  (if (functionp re)
> 		      (funcall re)
> 		    (looking-at re)))))))
>
> This is called when loading cangjie-table.b5 with
> 'image-type-auto-detected-p as the first parameter. Normally, the
> condition returns "t", but in this case it will return f, then
> the looking-at form fails with the error given. I don't understand which
> this process does not happen during the build which generates
> ldefs-boot-auto.el.

Would it help to use a --without-x build to generate ldefs-boot-auto.el?

> +                                          (t (error "Problem with `magic-mode-alist'."))

I'm not sure this improves the error message ("Problem" seems a bit
vague).  Before:

    Converting cangjie-table.b5 to tsang-b5.el...
    File mode specification error: (wrong-type-argument stringp image-type-auto-detected-p)
    Converting cangjie-table.b5 to tsang-b5.el...done

After (applying only the lisp/files.el part of your patch):

    Converting cangjie-table.b5 to tsang-b5.el...
    File mode specification error: (error Problem with ¥magic-fallback-mode-alist¦.)
    Converting cangjie-table.b5 to tsang-b5.el...done

Perhaps add in the problematic element to the message?  Something along
the lines of (error "Bad `magic-mode-alist' element: %S" re).





This bug report was last modified 8 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.