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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Re: font lock for text mode


From: Sergei Pokrovsky
Subject: Re: [h-e-w] Re: font lock for text mode
Date: 14 Jan 2002 15:39:54 +0600
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Benjamin" == Benjamin Riefenstahl <address@hidden> writes:

  Benjamin> Hi Jason,
  >> "Jeff Rancier" <address@hidden> writes: > (add-hook
  >> 'text-mode-hook 'font-lock-mode)
  >> > 
  >> > Should do it, eh?

  Benjamin> Jason Rumney <address@hidden> writes:
  >> I thought so (without testing it first), but it appears not to.

  Benjamin> This works for me:

  Benjamin> (add-hook 'text-mode-hook (lambda () (font-lock-mode 1)))

This is normally done with turn-on-font-lock:

(add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
...

,----
| (defun turn-on-font-lock ()
|   "Turn on Font Lock mode conditionally.
| Turn on only if the terminal can display it."
|   (when (and (not font-lock-mode) window-system)
|     (font-lock-mode)))
`----[font-lock.el]

-- 
Sergei



reply via email to

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