diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-05-06 15:16:27 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-05-06 15:16:27 +0000 |
commit | 95e60ff9843afdef2077b29ba94e768caf80cb63 (patch) | |
tree | 0a9f0e30869e30639b2217767c8b572c1a8ea22b /lisp/imenu.el | |
parent | 0f21c5a0a61c36dc39fcd78b7dbe1a10a8880b11 (diff) | |
download | emacs-95e60ff9843afdef2077b29ba94e768caf80cb63.tar.gz |
(imenu--generic-function): Use font-lock-defaults
case setting if imenu-case-fold-search is not locally set.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r-- | lisp/imenu.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el index 66b5816d5f8..a27243d0c18 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -745,9 +745,8 @@ Their results are gathered into an index alist." "Defines whether `imenu--generic-function' should fold case when matching. This variable should be set (only) by initialization code -for modes which use `imenu--generic-function'. If it is not set, that -function will use the current value of `case-fold-search' to match -patterns.") +for modes which use `imenu--generic-function'. If it is not set, but +`font-lock-defaults' is set, then font-lock's setting is used.") ;;;###autoload (make-variable-buffer-local 'imenu-case-fold-search) @@ -779,7 +778,10 @@ PATTERNS." (let ((index-alist (list 'dummy)) prev-pos beg - (case-fold-search imenu-case-fold-search) + (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) + (not (local-variable-p 'font-lock-defaults))) + imenu-case-fold-search + (nth 2 font-lock-defaults))) (old-table (syntax-table)) (table (copy-syntax-table (syntax-table))) (slist imenu-syntax-alist)) |