If you have a GPG-encrypted file, say notes.org.gpg
, emacs figures out that the major mode has to be set to org-mode
. This applies in general to any major mode out there; you do not need to modify the auto-mode-alist
for each major mode to support that .gpg
extension.
I would like to have my own extra extension, let's say .~bkp~
and have emacs ignore that when determining the major mode. Currently, if I have a file named notes.org.~bkp~
, the org-mode
is not set automatically.
I scoured through files.el
, epa*.el
, googled but couldn't figure out how emacs is ignoring the .gpg
in the file names.
What function can I probably advice or a variable can I tweak to support my custom appended extensions?