unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: 11434@debbugs.gnu.org
Subject: bug#11434: 24.0.96; Determining major mode for a given file extension
Date: Tue, 8 May 2012 17:44:44 +0100	[thread overview]
Message-ID: <CAOnWdoihABVVeaea7_cB4z+mbGr_6_f0mbtNPO5oVZiiMNObRQ@mail.gmail.com> (raw)
In-Reply-To: <87ipg6mxv7.fsf@sc3d.org>

On 8 May 2012 17:38, Reuben Thomas <rrt@sc3d.org> wrote:
> For now, I propose to rename it
> "*coffee-compiled*.js", but I'd appreciate suggestions as to how I could
> do this better. It would be nice to be able to give set-auto-mode a
> clue, in the form of a filename or an interpreter name, for cases like this.

Since it's the file name, not the buffer name, that matters, my
current solution is to do:

  (setq buffer-file-name "compiled.js")
  (set-auto-mode)
  (setq buffer-file-name nil)

Does that seem reasonable?

-- 
http://rrt.sc3d.org





  reply	other threads:[~2012-05-08 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 16:38 bug#11434: 24.0.96; Determining major mode for a given file extension Reuben Thomas
2012-05-08 16:44 ` Reuben Thomas [this message]
2012-05-08 18:24   ` Stefan Monnier
2012-05-08 18:30     ` Reuben Thomas
2012-05-09 12:35       ` Stefan Monnier
2019-10-31  7:31         ` Stefan Kangas
2019-11-29 12:45           ` Stefan Kangas
2019-11-01 18:12         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOnWdoihABVVeaea7_cB4z+mbGr_6_f0mbtNPO5oVZiiMNObRQ@mail.gmail.com \
    --to=rrt@sc3d.org \
    --cc=11434@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).