(defgroup etags nil "Tags tables"
:group 'tools)
+;;;###autoload
+(defcustom tags-case-fold-search 'default
+ "*Whether tags operations should be case-sensitive.
+A value of t means case-insensitive, a value of nil means case-sensitive.
+Any other value means use the setting of `case-fold-search'."
+ :group 'etags
+ :type '(choice (const :tag "Case-sensitive" nil)
+ (const :tag "Case-insensitive" t)
+ (other :tag "Use default" default))
+ :version "21.1")
+
;;;###autoload
;; Use `visit-tags-table-buffer' to cycle through tags tables in this list.
(defcustom tags-table-list nil
(tag-order order)
(match-marker (make-marker))
goto-func
+ (case-fold-search (if (memq tags-case-fold-search '(nil t))
+ tags-case-fold-search
+ case-fold-search))
)
(save-excursion
If it returns non-nil, this file needs processing by evalling
\`tags-loop-operate'. Otherwise, move on to the next file.")
+(defun tags-loop-eval (form)
+ "Evaluate FORM and return its result.
+Bind `case-fold-search' during the evaluation, depending on the value of
+`tags-case-fold-search'."
+ (let ((case-fold-search (if (memq tags-case-fold-search '(t nil))
+ tags-case-fold-search
+ case-fold-search)))
+ (eval form)))
+
+
;;;###autoload
(defun tags-loop-continue (&optional first-time)
"Continue last \\[tags-search] or \\[tags-query-replace] command.
(while (or first-time file-finished
(save-restriction
(widen)
- (not (eval tags-loop-scan))))
+ (not (tags-loop-eval tags-loop-scan))))
(setq file-finished nil)
(setq new (next-file first-time t))
;; If NEW is non-nil, we got a temp buffer,
;; Now operate on the file.
;; If value is non-nil, continue to scan the next file.
- (eval tags-loop-operate))
+ (tags-loop-eval tags-loop-operate))
(setq file-finished t))
(and messaged
(null tags-loop-operate)