From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
Subject: Re: hook and interactive with parameter
Date: Tue, 13 Feb 2018 20:02:20 +0100 [thread overview]
Message-ID: <868tbwhfwj.fsf@zoho.com> (raw)
In-Reply-To: mailman.9028.1518511493.27995.help-gnu-emacs@gnu.org
Yuri Khan wrote:
> Option 1: Bind intero-mode to an easy key,
> such as <f9>. Press it after opening each
> file. In term of keypresses, pressing <f9> is
> not much worse than pressing “y” when you
> want to enable the mode, and not pressing
> <f9> is cheaper than pressing “n” when you
> don’t.
Yes, this is the best idea.
If you notice that for certain files
(particular files) you always do this, you can
use this
(setq magic-mode-alist '(("/\\* cpp \\*/" . c++-mode)))
for those files, only adapted to Haskell, not
C++.
To test it, put
/* cpp */
as the first line in a file called cpp.txt -
now, the ".txt" extention should put the file
in text mode. But eval the above form, close
the file, and open it again - now it should be
in C++.
Magic :)
--
underground experts united
http://user.it.uu.se/~embe8573
next prev parent reply other threads:[~2018-02-13 19:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.8968.1518443498.27995.help-gnu-emacs@gnu.org>
2018-02-12 15:28 ` hook and interactive with parameter Emanuel Berg
2018-02-12 15:43 ` Lajos Bodnar
2018-02-12 16:15 ` tomas
[not found] ` <mailman.8981.1518452114.27995.help-gnu-emacs@gnu.org>
2018-02-12 16:21 ` Emanuel Berg
2018-02-13 8:23 ` Lajos Bodnar
2018-02-13 8:42 ` Lajos Bodnar
2018-02-13 8:44 ` Yuri Khan
2018-02-13 8:51 ` tomas
2018-02-13 9:05 ` Lajos Bodnar
[not found] ` <mailman.9028.1518511493.27995.help-gnu-emacs@gnu.org>
2018-02-13 19:02 ` Emanuel Berg [this message]
[not found] ` <mailman.8974.1518450193.27995.help-gnu-emacs@gnu.org>
2018-02-12 16:16 ` Emanuel Berg
2018-02-12 10:03 Lajos Bodnar
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868tbwhfwj.fsf@zoho.com \
--to=moasen@zoho.com \
--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.
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).