Implement case-insensitivity in hi-lock (bug#40337)
* lisp/hi-lock.el (hi-lock-interactive-lighters): New buffer-local variable.
(hi-lock-mode): Set hi-lock-interactive-lighters to nil.
(hi-lock-line-face-buffer): Use case-fold-search and search-upper-case.
(hi-lock-face-buffer): Add new arg LIGHTER. Use case-fold-search,
search-upper-case and search-spaces-regexp.
(hi-lock-face-phrase-buffer): Don't call hi-lock-process-phrase.
Use case-fold-search, search-upper-case and search-whitespace-regexp.
(hi-lock-face-symbol-at-point): Use case-fold-search and search-upper-case.
(hi-lock-unface-buffer): Use hi-lock-interactive-lighters to get
a human-readable string for completion and x-popup-menu.
(hi-lock-process-phrase): Remove function.
(hi-lock-set-pattern): Add new args LIGHTER, CASE-FOLD, SPACES-REGEXP.
Set font-lock pattern to a search function. Add mapping from
lighter or regexp to pattern to hi-lock-interactive-lighters.
Let-bind case-fold-search and search-spaces-regexp in search functions.
* lisp/isearch.el (isearch--highlight-regexp-or-lines): Replace ugly code
with let-binding of case-fold-search, search-upper-case, search-spaces-regexp.
(isearch-highlight-regexp, isearch-highlight-lines-matching-regexp):
Use lambda.