aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-05-06 15:16:27 +0000
committerStefan Monnier2003-05-06 15:16:27 +0000
commit95e60ff9843afdef2077b29ba94e768caf80cb63 (patch)
tree0a9f0e30869e30639b2217767c8b572c1a8ea22b
parent0f21c5a0a61c36dc39fcd78b7dbe1a10a8880b11 (diff)
downloademacs-95e60ff9843afdef2077b29ba94e768caf80cb63.tar.gz
emacs-95e60ff9843afdef2077b29ba94e768caf80cb63.zip
(imenu--generic-function): Use font-lock-defaults
case setting if imenu-case-fold-search is not locally set.
-rw-r--r--lisp/imenu.el10
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."
745 "Defines whether `imenu--generic-function' should fold case when matching. 745 "Defines whether `imenu--generic-function' should fold case when matching.
746 746
747This variable should be set (only) by initialization code 747This variable should be set (only) by initialization code
748for modes which use `imenu--generic-function'. If it is not set, that 748for modes which use `imenu--generic-function'. If it is not set, but
749function will use the current value of `case-fold-search' to match 749`font-lock-defaults' is set, then font-lock's setting is used.")
750patterns.")
751;;;###autoload 750;;;###autoload
752(make-variable-buffer-local 'imenu-case-fold-search) 751(make-variable-buffer-local 'imenu-case-fold-search)
753 752
@@ -779,7 +778,10 @@ PATTERNS."
779 778
780 (let ((index-alist (list 'dummy)) 779 (let ((index-alist (list 'dummy))
781 prev-pos beg 780 prev-pos beg
782 (case-fold-search imenu-case-fold-search) 781 (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search)
782 (not (local-variable-p 'font-lock-defaults)))
783 imenu-case-fold-search
784 (nth 2 font-lock-defaults)))
783 (old-table (syntax-table)) 785 (old-table (syntax-table))
784 (table (copy-syntax-table (syntax-table))) 786 (table (copy-syntax-table (syntax-table)))
785 (slist imenu-syntax-alist)) 787 (slist imenu-syntax-alist))