diff options
| author | Juri Linkov | 2020-04-12 02:45:02 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-04-12 02:45:02 +0300 |
| commit | 86b820752349de572bfbb306cc0d8f7cea41d0a7 (patch) | |
| tree | 31fd8df7c51e4ec37fba45a3273f7da78b666e49 /etc | |
| parent | e7b4233d9bccf4f65c008682eef4f88d0f003d6d (diff) | |
| download | emacs-86b820752349de572bfbb306cc0d8f7cea41d0a7.tar.gz emacs-86b820752349de572bfbb306cc0d8f7cea41d0a7.zip | |
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.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -257,6 +257,13 @@ case-insensitive matching of messages when the old behaviour is | |||
| 257 | required, but the recommended solution is to use a correctly matching | 257 | required, but the recommended solution is to use a correctly matching |
| 258 | regexp instead. | 258 | regexp instead. |
| 259 | 259 | ||
| 260 | ** Hi-Lock | ||
| 261 | |||
| 262 | *** Matching in 'hi-lock-mode' is case-sensitive when regexp contains | ||
| 263 | upper case characters and `search-upper-case' is non-nil. | ||
| 264 | 'highlight-phrase' also uses 'search-whitespace-regexp' | ||
| 265 | to substitute spaces in regexp search. | ||
| 266 | |||
| 260 | ** Texinfo | 267 | ** Texinfo |
| 261 | 268 | ||
| 262 | --- | 269 | --- |