all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1297: font-lock-keywords-case-fold-search doc and usage
@ 2008-11-02 15:56 ` 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
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-11-02 15:56 UTC (permalink / raw
  To: bug-gnu-emacs


font-lock-keywords-case-fold-search docstring should make it more clear
that font-lock-defaults erases it.

There is one victim in the tree.  `lisp-mode' does:

  (make-local-variable 'font-lock-keywords-case-fold-search)
  (setq font-lock-keywords-case-fold-search t)

but the value of font-lock-keywords-case-fold-search in a lisp-mode
buffer is nil, that's because font-lock-defaults does a
kill-local-variable on it...








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

* bug#1297: marked as done (font-lock-keywords-case-fold-search doc and usage)
  2008-11-02 15:56 ` bug#1297: font-lock-keywords-case-fold-search doc and usage Dan Nicolaescu
@ 2008-11-03  3:05   ` Emacs bug Tracking System
  0 siblings, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2008-11-03  3:05 UTC (permalink / raw
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]


Your message dated Sun, 02 Nov 2008 21:56:31 -0500
with message-id <87od0xh600.fsf@cyd.mit.edu>
and subject line Re: font-lock-keywords-case-fold-search doc and usage
has caused the Emacs bug report #1297,
regarding font-lock-keywords-case-fold-search doc and usage
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1297: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1297
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 2784 bytes --]

From: Dan Nicolaescu <dann@ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs@gnu.org>
Subject: font-lock-keywords-case-fold-search doc and usage
Date: Sun, 2 Nov 2008 07:56:33 -0800 (PST)
Message-ID: <200811021556.mA2FuXo1028390@mothra.ics.uci.edu>


font-lock-keywords-case-fold-search docstring should make it more clear
that font-lock-defaults erases it.

There is one victim in the tree.  `lisp-mode' does:

  (make-local-variable 'font-lock-keywords-case-fold-search)
  (setq font-lock-keywords-case-fold-search t)

but the value of font-lock-keywords-case-fold-search in a lisp-mode
buffer is nil, that's because font-lock-defaults does a
kill-local-variable on it...





[-- Attachment #3: Type: message/rfc822, Size: 1644 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 1297-done@emacsbugs.donarmstrong.com
Subject: Re: font-lock-keywords-case-fold-search doc and usage
Date: Sun, 02 Nov 2008 21:56:31 -0500
Message-ID: <87od0xh600.fsf@cyd.mit.edu>

> font-lock-keywords-case-fold-search docstring should make it more clear
> that font-lock-defaults erases it.

Okay, I changed it to make it hopefully clearer.

> There is one victim in the tree.  `lisp-mode' does:
>
>   (make-local-variable 'font-lock-keywords-case-fold-search)
>   (setq font-lock-keywords-case-fold-search t)
>
> but the value of font-lock-keywords-case-fold-search in a lisp-mode
> buffer is nil, that's because font-lock-defaults does a
> kill-local-variable on it...

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.


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

* bug#1297: font-lock-keywords-case-fold-search doc and usage
       [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  4:44 ` Dan Nicolaescu
  2008-11-03 15:19   ` Chong Yidong
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-11-03  4:44 UTC (permalink / raw
  To: Chong Yidong; +Cc: 1297

Chong Yidong <cyd@stupidchicken.com> writes:

  > > font-lock-keywords-case-fold-search docstring should make it more clear
  > > that font-lock-defaults erases it.
  > 
  > Okay, I changed it to make it hopefully clearer.

Thanks.

  > > There is one victim in the tree.  `lisp-mode' does:
  > >
  > >   (make-local-variable 'font-lock-keywords-case-fold-search)
  > >   (setq font-lock-keywords-case-fold-search t)
  > >
  > > but the value of font-lock-keywords-case-fold-search in a lisp-mode
  > > buffer is nil, that's because font-lock-defaults does a
  > > kill-local-variable on it...
  > 
  > 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)






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

* bug#1297: font-lock-keywords-case-fold-search doc and usage
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2008-11-03 15:19 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: 1297

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.






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

* bug#1297: font-lock-keywords-case-fold-search doc and usage
  2008-11-03 15:19   ` Chong Yidong
@ 2008-11-04  7:22     ` Dan Nicolaescu
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Nicolaescu @ 2008-11-04  7:22 UTC (permalink / raw
  To: Chong Yidong; +Cc: 1297

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]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")






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

end of thread, other threads:[~2008-11-04  7:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.