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

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

Re: Major mode definition: make keywords case-insensitive


From: Jens Teich
Subject: Re: Major mode definition: make keywords case-insensitive
Date: Fri, 16 May 2008 07:25:22 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (darwin)

Jens Teich <spamtrap@jensteich.de> writes:

> I created my first major mode, tataa! I could not believe how easy
> this is:
>
> (define-generic-mode filemaker-mode
>   '("//" ("/*" . "*/"))
>   '("Abs" "Acos" "Asin" "Atan" "Average" ...)
>   '() '() '()
>   "Mode for editing FileMaker calculatiions")
>
> Now I want to make the keywords case-insensitive and tried
>
> (define-generic-mode filemaker-mode
>   '("//" ("/*" . "*/"))
>   '("Abs" "Acos" "Asin" "Atan" "Average" ...)
>   '() '()
>   (list (lambda () (setq font-lock-keywords-case-fold-search t)))
>   "Mode for editing FileMaker calculatiions")
>
> but this does not work as expected. What's wrong?

found the solution in 'generic-x.el --- A collection of generic modes'

...
  (list
   (function
    (lambda()
      (setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
...

Jens



reply via email to

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