[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hook and interactive with parameter
From: |
Emanuel Berg |
Subject: |
Re: hook and interactive with parameter |
Date: |
Tue, 13 Feb 2018 20:02:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
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
- hook and interactive with parameter, Lajos Bodnar, 2018/02/12
- Re: hook and interactive with parameter, Emanuel Berg, 2018/02/12
- Re: hook and interactive with parameter, Lajos Bodnar, 2018/02/12
- Re: hook and interactive with parameter, tomas, 2018/02/12
- Message not available
- Re: hook and interactive with parameter, Emanuel Berg, 2018/02/12
- Re: hook and interactive with parameter, Lajos Bodnar, 2018/02/13
- Re: hook and interactive with parameter, Lajos Bodnar, 2018/02/13
- Re: hook and interactive with parameter, Yuri Khan, 2018/02/13
- Re: hook and interactive with parameter, tomas, 2018/02/13
- Re: hook and interactive with parameter, Lajos Bodnar, 2018/02/13
- Message not available
- Re: hook and interactive with parameter,
Emanuel Berg <=
Message not available