* dns mode
@ 2010-04-21 18:33 Nachiket Gokhale
2010-04-21 20:49 ` Dmitry Dzhus
2010-05-07 6:48 ` Reiner Steib
0 siblings, 2 replies; 5+ messages in thread
From: Nachiket Gokhale @ 2010-04-21 18:33 UTC (permalink / raw)
To: help-gnu-emacs
It appears that I cannot save files with the extension "zone" e.g.
"foobar.zone" because emacs has loaded something called dns-mode by
default. How do I turn this thing off? What change do I have to make
to my .emacs.d/init.el file?
Thanks a lot,
-Nachiket
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dns mode
2010-04-21 18:33 dns mode Nachiket Gokhale
@ 2010-04-21 20:49 ` Dmitry Dzhus
2010-05-06 22:43 ` Kevin Rodgers
[not found] ` <mailman.14.1273185801.9285.help-gnu-emacs@gnu.org>
2010-05-07 6:48 ` Reiner Steib
1 sibling, 2 replies; 5+ messages in thread
From: Dmitry Dzhus @ 2010-04-21 20:49 UTC (permalink / raw)
To: help-gnu-emacs
Nachiket Gokhale wrote:
> It appears that I cannot save files with the extension "zone" e.g.
> "foobar.zone" because emacs has loaded something called dns-mode by
> default. How do I turn this thing off? What change do I have to make
> to my .emacs.d/init.el file?
Emacs associates file extensions and major modes by looking into
`auto-mode-alist` variable, you can clean all `.zone`-matching entries
from it if you don't want Emacs to turn on DNS mode when editing such files:
(setq auto-mode-alist (delete '("\\.\\(soa\\|zone\\)\\'" . dns-mode) auto-mode-alist))
(setq auto-mode-alist (delete '("\\.zone\\'" . zone-mode) auto-mode-alist))
You may get more information by reading section 27.1 of GNU Emacs manual
(«How Major Modes are Chosen»).
--
Happy Hacking.
http://sphinx.net.ru
む
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dns mode
2010-04-21 20:49 ` Dmitry Dzhus
@ 2010-05-06 22:43 ` Kevin Rodgers
[not found] ` <mailman.14.1273185801.9285.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2010-05-06 22:43 UTC (permalink / raw)
To: help-gnu-emacs
Dmitry Dzhus wrote:
> Nachiket Gokhale wrote:
>> It appears that I cannot save files with the extension "zone" e.g.
>> "foobar.zone" because emacs has loaded something called dns-mode by
>> default. How do I turn this thing off? What change do I have to make
>> to my .emacs.d/init.el file?
>
> Emacs associates file extensions and major modes by looking into
> `auto-mode-alist` variable, you can clean all `.zone`-matching entries
> from it if you don't want Emacs to turn on DNS mode when editing such files:
>
> (setq auto-mode-alist (delete '("\\.\\(soa\\|zone\\)\\'" . dns-mode) auto-mode-alist))
> (setq auto-mode-alist (delete '("\\.zone\\'" . zone-mode) auto-mode-alist))
Oddly enough, my emacs (22.3) -Q has 2 entries for dns-mode in auto-mode-alist:
("\\.soa\\'" . dns-mode)
("\\.\\(soa\\|zone\\)\\'" . dns-mode)
So I would do something like:
(let ((auto-dns))
(while (setq auto-dns (rassq 'dns-mode auto-mode-alist))
(setq auto-mode-alist (delq auto-dns auto-mode-alist))))
And similarly for zone-mode. This also has the advantage of working
regardless of the regexp used to match the file name.
> You may get more information by reading section 27.1 of GNU Emacs manual
> («How Major Modes are Chosen»).
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.14.1273185801.9285.help-gnu-emacs@gnu.org>]
* Re: dns mode
2010-04-21 18:33 dns mode Nachiket Gokhale
2010-04-21 20:49 ` Dmitry Dzhus
@ 2010-05-07 6:48 ` Reiner Steib
1 sibling, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2010-05-07 6:48 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, Apr 21 2010, Nachiket Gokhale wrote:
> It appears that I cannot save files with the extension "zone" e.g.
> "foobar.zone" because emacs has loaded something called dns-mode by
> default. How do I turn this thing off? What change do I have to make
> to my .emacs.d/init.el file?
Maybe it is a bug in dns-mode that there is no way to force a save?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-07 6:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 18:33 dns mode Nachiket Gokhale
2010-04-21 20:49 ` Dmitry Dzhus
2010-05-06 22:43 ` Kevin Rodgers
[not found] ` <mailman.14.1273185801.9285.help-gnu-emacs@gnu.org>
2010-05-07 2:59 ` Stefan Monnier
2010-05-07 6:48 ` Reiner Steib
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).