emacs-pretest-bug
[Top][All Lists]
Advanced

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

Font lock


From: Håkan Granath
Subject: Font lock
Date: Wed, 01 Sep 2004 20:05:27 +0200

In certain third party major modes I have problems with font locking
in CVS Emacs. A minimal example is: run emacs -q --no-site-file and
evaluate:

    (defun foo-mode()
      "Foo mode"
      (interactive)
      (kill-all-local-variables)
      (setq major-mode 'foo-mode)
      (setq mode-name "Foo")
      (set-syntax-table foo-mode-syntax-table)
      (make-local-variable 'comment-start)
      (setq comment-start "-- ")
      (make-local-variable 'comment-end)
      (setq comment-end "")
      (turn-on-font-lock))

    (setq foo-mode-syntax-table (copy-syntax-table))
    (modify-syntax-entry ?-  ". 12" foo-mode-syntax-table)
    (modify-syntax-entry ?\n ">"    foo-mode-syntax-table)

    (switch-to-buffer "foo")
    (insert-string "-- This should be fontified\n")
    (foo-mode)

In Emacs 21.3, the buffer foo is fontified, but in CVS Emacs I have
to manually type M-x font-lock-fontify-buffer. This also have to be
executed to update the fontification when the buffer is edited.

Best regards,

Håkan Granath






reply via email to

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