Subject: Re: bug#11434: 24.0.96; Determining major mode for a given file extension

From: Stefan Monnier <[email-masked]>
Date: Wed, 09 May 2012 08:35:57 -0400

>> I'd use (let ((buffer-file-name "foo.js")) (set-auto-mode)) instead.
> So it's just my Lisp that's bad, not my approach? :)

I think so, yes.  You can also use create-file-buffer with some dummy
file name and then call after-find-file (that's what I did in PCL-CVS).

        Stefan