Skip to content

Instantly share code, notes, and snippets.

@mpolden
Created October 23, 2014 21:17
Show Gist options
  • Save mpolden/add875e1b11ebb8e0762 to your computer and use it in GitHub Desktop.
Save mpolden/add875e1b11ebb8e0762 to your computer and use it in GitHub Desktop.
Set major-mode for buffers created with C-x b
(setq-default major-mode
(lambda ()
(unless buffer-file-name
(let ((buffer-file-name (buffer-name)))
(set-auto-mode t)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment