| Re: Trying to disable the fontification of strings in fundamental-mode |
|
 |
|
 |
|
 |
|
 |
Group: gnu.emacs.help · Group Profile
Author: Nikolaj SchumacherNikolaj Schumacher Date: Sep 12, 2008 01:57
Davin Pearson gmail.com> wrote:
> What do I need to do to restrict the suppressing of the fontification
> of strings to just fundamental mode?
First of all, don't use advice for this! Use hooks, which are cleaner
and safer.
Second of all, setq changes the variable globally, so naturally it is
disabled everywhere. You need to make the variable buffer-local.
(defun my-fundamental-mode-hook ()
(set (make-variable-buffer-local 'font-lock-string-face) nil))
(add-hook 'fundamental-mode-hook 'my-fundamental-mode-hook)
regards,
Nikolaj Schumacher
|