From: Nick Helm <nick@tenpoint.co.nz>
To: help-gnu-emacs@gnu.org
Subject: Re: Enabling modes
Date: Mon, 11 Sep 2017 14:41:51 +1200 [thread overview]
Message-ID: <m28thm6jo0.fsf@tenpoint.co.nz> (raw)
In-Reply-To: <87wp57eqz1.fsf@robertthorpeconsulting.com> (Robert Thorpe's message of "Sat, 09 Sep 2017 18:12:18 +0100")
Robert Thorpe <rt@robertthorpeconsulting.com> writes:
> I use global-visual-line mode. I've found a problem with it for one
> file type that I use (tab-separated values).
>
> So, what I want to do is set visual-line-mode in all buffers except
> those particular ones.
>
> Usually modes are set up the other way around, by including things.
> Mode X is triggered for languages Y and Z, for example. I want it the
> opposite way around, I want visual-line-mode to be always enabled unless
> I have a tab-separated-value file.
>
> Is that possible?
You could use mode hooks, but if you'd prefer to turn it off just for
files with a TSV extension you could add an entry to auto-mode-alist.
Something like this in your init should work:
(global-visual-line-mode)
(add-to-list 'auto-mode-alist '("\\.tsv\\'" . (lambda () (visual-line-mode -1))))
Alternatively, you could use magic-mode-alist to detect the tabbed
format itself, which would work for any extension.
next prev parent reply other threads:[~2017-09-11 2:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-09 17:12 Enabling modes Robert Thorpe
2017-09-09 17:50 ` Eli Zaretskii
2017-09-12 22:35 ` Robert Thorpe
2017-09-12 22:45 ` Emanuel Berg
2017-09-11 2:41 ` Nick Helm [this message]
2017-09-12 22:30 ` Robert Thorpe
[not found] ` <mailman.294.1505097738.14750.help-gnu-emacs@gnu.org>
2017-09-11 2:57 ` Emanuel Berg
[not found] <mailman.198.1504977154.14750.help-gnu-emacs@gnu.org>
2017-09-09 17:27 ` Emanuel Berg
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m28thm6jo0.fsf@tenpoint.co.nz \
--to=nick@tenpoint.co.nz \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.