GNU bug report logs -
#65891
29.0.91; Could the error msg be better for this?
Previous Next
Full log
View this message in rfc822 format
> > I'm guessing that it's flagged as a "file mode specification" error
> > because it's from a mode hook?
>
> It comes from processing auto-mode-alist, see normal-mode:
>
> (with-demoted-errors "File mode specification error: %s"
> (set-auto-mode))
>
> > But major modes are not necessarily about file buffers.
>
> auto-mode-alist is only about matching file names to modes, so the error
> message looks fitting.
Fair enough, I guess. But I still have the question
of whether we can do better here.
Also, I think `C-x b foo' followed by `M-x org-mode'
behaves the same, though no file buffer is involved.
A mode hook doesn't have any necessary relation to any
file or to `auto-mode-alist'. It may be that Emacs
has chosen to relate the two in this way, as a kind of
shortcut, but there's no necessary connection, right?
This bug report was last modified 1 year and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.