diff options
| author | Dan Nicolaescu | 2008-11-07 06:30:17 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-11-07 06:30:17 +0000 |
| commit | 94686171695dc6261f462015fcb93b9e5aa56c59 (patch) | |
| tree | 24025d209ebb2547f7792c77bd4cb0d0f3420386 | |
| parent | 14760e95cf18e60618f24e56577ceb3dd6ea5ca5 (diff) | |
| download | emacs-94686171695dc6261f462015fcb93b9e5aa56c59.tar.gz emacs-94686171695dc6261f462015fcb93b9e5aa56c59.zip | |
(lisp-mode-variables): Add new argument
to initialize font-lock keyword case sensitivity.
(lisp-mode): Use it.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d1bb0a3f74..ad757824096 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-11-07 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add new argument | ||
| 4 | to initialize font-lock keyword case sensitivity. | ||
| 5 | (lisp-mode): Use it. | ||
| 6 | |||
| 1 | 2008-11-06 Glenn Morris <rgm@gnu.org> | 7 | 2008-11-06 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * eshell/esh-maint.el: Remove unused file. | 9 | * eshell/esh-maint.el: Remove unused file. |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 798bdf821ba..25dad344e27 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -193,9 +193,11 @@ | |||
| 193 | font-lock-string-face)))) | 193 | font-lock-string-face)))) |
| 194 | font-lock-comment-face)) | 194 | font-lock-comment-face)) |
| 195 | 195 | ||
| 196 | ;; The LISP-SYNTAX argument is used by code in inf-lisp.el and is | 196 | (defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive) |
| 197 | ;; (uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el | 197 | "Common initialization routine for lisp modes. |
| 198 | (defun lisp-mode-variables (&optional lisp-syntax) | 198 | The LISP-SYNTAX argument is used by code in inf-lisp.el and is |
| 199 | (uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el | ||
| 200 | KEYWORDS-CASE-SENSITIVE means that for font-lock keywords will not be case sensitive." | ||
| 199 | (when lisp-syntax | 201 | (when lisp-syntax |
| 200 | (set-syntax-table lisp-mode-syntax-table)) | 202 | (set-syntax-table lisp-mode-syntax-table)) |
| 201 | (setq local-abbrev-table lisp-mode-abbrev-table) | 203 | (setq local-abbrev-table lisp-mode-abbrev-table) |
| @@ -241,9 +243,9 @@ | |||
| 241 | (setq multibyte-syntax-as-symbol t) | 243 | (setq multibyte-syntax-as-symbol t) |
| 242 | (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun) | 244 | (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun) |
| 243 | (setq font-lock-defaults | 245 | (setq font-lock-defaults |
| 244 | '((lisp-font-lock-keywords | 246 | `((lisp-font-lock-keywords |
| 245 | lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) | 247 | lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) |
| 246 | nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil | 248 | nil ,keywords-case-insensitive (("+-*/.<>=!?$%_&~^:@" . "w")) nil |
| 247 | (font-lock-mark-block-function . mark-defun) | 249 | (font-lock-mark-block-function . mark-defun) |
| 248 | (font-lock-syntactic-face-function | 250 | (font-lock-syntactic-face-function |
| 249 | . lisp-font-lock-syntactic-face-function)))) | 251 | . lisp-font-lock-syntactic-face-function)))) |
| @@ -464,7 +466,7 @@ if that value is non-nil." | |||
| 464 | (use-local-map lisp-mode-map) | 466 | (use-local-map lisp-mode-map) |
| 465 | (setq major-mode 'lisp-mode) | 467 | (setq major-mode 'lisp-mode) |
| 466 | (setq mode-name "Lisp") | 468 | (setq mode-name "Lisp") |
| 467 | (lisp-mode-variables) | 469 | (lisp-mode-variables nil t) |
| 468 | (make-local-variable 'comment-start-skip) | 470 | (make-local-variable 'comment-start-skip) |
| 469 | (setq comment-start-skip | 471 | (setq comment-start-skip |
| 470 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") | 472 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") |