unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 1297@emacsbugs.donarmstrong.com
Subject: bug#1297: font-lock-keywords-case-fold-search doc and usage
Date: Mon, 3 Nov 2008 23:22:54 -0800 (PST)	[thread overview]
Message-ID: <200811040722.mA47Ms3q020156@mothra.ics.uci.edu> (raw)
In-Reply-To: <8763n4ltv2.fsf@cyd.mit.edu> (Chong Yidong's message of "Mon, 03 Nov 2008 10:19:45 -0500")

Chong Yidong <cyd@stupidchicken.com> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > >   > Great catch.  No one has complained about this, so clearly it's OK for
  > >   > font-lock-keywords-case-fold-search to be nil.  I removed the bogus
  > >   > 8-year-old setting of font-lock-keywords-case-fold-search.
  > >
  > > But that's not quite right, not sure about the standard, but there are
  > > lisps that are case insensitive:
  > >
  > > (DEFUN foo (arg)
  > >  blah)
  > >
  > > ought to be fontified the same was as:
  > >
  > > (defun foo (arg)
  > >  blah)
  > 
  > We can put this in the wishlist.  I don't see any reason to rock this
  > particular boat right now.

It's easier to fix than to write a wishlist item

--- lisp-mode.el.~1.230.~	2008-11-02 21:49:24.000000000 -0800
+++ lisp-mode.el	2008-11-03 23:13:38.000000000 -0800
@@ -195,7 +195,8 @@
 
 ;; The LISP-SYNTAX argument is used by code in inf-lisp.el and is
 ;; (uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el
-(defun lisp-mode-variables (&optional lisp-syntax)
+;; KEYWORDS-CASE-SENSITIVE means that for font-lock keywords will not be case sensitive.
+(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive)
   (when lisp-syntax
     (set-syntax-table lisp-mode-syntax-table))
   (setq local-abbrev-table lisp-mode-abbrev-table)
@@ -241,9 +242,9 @@
   (setq multibyte-syntax-as-symbol t)
   (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun)
   (setq font-lock-defaults
-	'((lisp-font-lock-keywords
+	`((lisp-font-lock-keywords
 	   lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
-	  nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil
+	  nil ,keywords-case-insensitive (("+-*/.<>=!?$%_&~^:@" . "w")) nil
 	  (font-lock-mark-block-function . mark-defun)
 	  (font-lock-syntactic-face-function
 	   . lisp-font-lock-syntactic-face-function))))
@@ -464,7 +465,7 @@ if that value is non-nil."
   (use-local-map lisp-mode-map)
   (setq major-mode 'lisp-mode)
   (setq mode-name "Lisp")
-  (lisp-mode-variables)
+  (lisp-mode-variables nil t)
   (make-local-variable 'comment-start-skip)
   (setq comment-start-skip
        "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")






      reply	other threads:[~2008-11-04  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87od0xh600.fsf@cyd.mit.edu>
2008-11-02 15:56 ` bug#1297: font-lock-keywords-case-fold-search doc and usage Dan Nicolaescu
2008-11-03  3:05   ` bug#1297: marked as done (font-lock-keywords-case-fold-search doc and usage) Emacs bug Tracking System
2008-11-03  4:44 ` bug#1297: font-lock-keywords-case-fold-search doc and usage Dan Nicolaescu
2008-11-03 15:19   ` Chong Yidong
2008-11-04  7:22     ` Dan Nicolaescu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811040722.mA47Ms3q020156@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=1297@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).