unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49143: 28.0.50; find-file-literally doesn't ignore `mode:`
@ 2021-06-20 17:54 Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-21 12:54 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-20 17:54 UTC (permalink / raw)
  To: 49143

Package: Emacs
Version: 28.0.50


Contrary to its documentation, it seems that `find-file-literally`
doesn't ignore file-local `mode:` settings any more, as evidenced by the
following backtrace:

    dismal-mode()
    hack-one-local-variable(mode dismal)
    hack-local-variables-apply()
    hack-local-variables(no-mode)
    run-mode-hooks()
    fundamental-mode()
    set-buffer-major-mode(#<buffer normalization.dis>)
    set-auto-mode()
    normal-mode(t)
    after-find-file(nil t)
    find-file-noselect-1(#<buffer normalization.dis> "~/tmp/normalization.dis" nil nil "~/tmp/normalization.dis" (1347023 65026))
    find-file-noselect("~/tmp/normalization.dis")

I suspect the culprit is

    commit 5bedbe6b1d5f4b801abf91b4d023d5c4e66418f0
    Author: Lars Ingebrigtsen <larsi@gnus.org>
    Date:   Mon May 10 12:40:11 2021 +0200
    
        Always heed the `lexical-binding' local variable
        
        * doc/lispref/variables.texi (File Local Variables): Document
        `permanently-enabled-local-variables'.
        
        * lisp/files.el (enable-local-variables): Mention the new variable.
        (set-auto-mode): Always call `hack-local-variables'.
        (hack-local-variables): Factor out the variable gathering into its
        own function, and respect the new variable (bug#47843).
        (hack-local-variables--find-variables): Factored out from
        `hack-local-variables'.
        (permanently-enabled-local-variables): New variable.


-- Stefan






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#49143: 28.0.50; find-file-literally doesn't ignore `mode:`
  2021-06-20 17:54 bug#49143: 28.0.50; find-file-literally doesn't ignore `mode:` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-21 12:54 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-21 12:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 49143

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Contrary to its documentation, it seems that `find-file-literally`
> doesn't ignore file-local `mode:` settings any more, as evidenced by the
> following backtrace:
>
>     dismal-mode()
>     hack-one-local-variable(mode dismal)

Oops.

> I suspect the culprit is
>
>     commit 5bedbe6b1d5f4b801abf91b4d023d5c4e66418f0
>     Author: Lars Ingebrigtsen <larsi@gnus.org>
>     Date:   Mon May 10 12:40:11 2021 +0200

Yes, indeed.  I think I've now found the right fix -- I'm not totally
confident that it's the correct level to fix this on, though...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-21 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-20 17:54 bug#49143: 28.0.50; find-file-literally doesn't ignore `mode:` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-21 12:54 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).