help-gnu-emacs
[Top][All Lists]
Advanced

[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: Mon, 12 Feb 2018 17:16:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Lajos Bodnar wrote:

> Thanks for your advice. I would like to write
> a function which run up if I open a haskell
> file. This function will ask a question
> automaticaly about that i would like to run
> the intero-mode or not.

I don't know if that is such a good idea, but
something like this would do it:

(defun ask-text-mode ()
  (when (yes-or-no-p "Activate text mode? ")
    (text-mode) ))

;; (setq nroff-mode-hook nil)
(defun nroff-mode-hook-temp-f ()
  (ask-text-mode) )
(add-hook 'nroff-mode-hook #'nroff-mode-hook-temp-f)

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]