aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu <[email protected]>2008-11-07 06:30:17 +0000
committerDan Nicolaescu <[email protected]>2008-11-07 06:30:17 +0000
commit94686171695dc6261f462015fcb93b9e5aa56c59 (patch)
tree24025d209ebb2547f7792c77bd4cb0d0f3420386
parent14760e95cf18e60618f24e56577ceb3dd6ea5ca5 (diff)
(lisp-mode-variables): Add new argument
to initialize font-lock keyword case sensitivity. (lisp-mode): Use it.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp-mode.el14
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d1bb0a3f7..ad75782409 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-07 Dan Nicolaescu <[email protected]>
+
+ * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add new argument
+ to initialize font-lock keyword case sensitivity.
+ (lisp-mode): Use it.
+
2008-11-06 Glenn Morris <[email protected]>
* eshell/esh-maint.el: Remove unused file.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 798bdf821b..25dad344e2 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -193,9 +193,11 @@
font-lock-string-face))))
font-lock-comment-face))
-;; 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)
+(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive)
+ "Common initialization routine for lisp modes.
+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
+KEYWORDS-CASE-SENSITIVE means that for font-lock keywords will not be case sensitive."
(when lisp-syntax
(set-syntax-table lisp-mode-syntax-table))
(setq local-abbrev-table lisp-mode-abbrev-table)
@@ -241,9 +243,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 +466,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]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")