unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Major mode definition: make keywords case-insensitive
@ 2008-05-16  1:50 Jens Teich
  2008-05-16  5:25 ` Jens Teich
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Teich @ 2008-05-16  1:50 UTC (permalink / raw)
  To: help-gnu-emacs

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?

Jens


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Major mode definition: make keywords case-insensitive
  2008-05-16  1:50 Major mode definition: make keywords case-insensitive Jens Teich
@ 2008-05-16  5:25 ` Jens Teich
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Teich @ 2008-05-16  5:25 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-16  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16  1:50 Major mode definition: make keywords case-insensitive Jens Teich
2008-05-16  5:25 ` Jens Teich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).