bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Reuben Thomas
Subject: bug#11434: 24.0.96; Determining major mode for a given file extension
Date: Tue, 8 May 2012 17:44:44 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]