mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-11 08:30:45 -08:00
Fix font-lock of last character before EOB under 'whitespace-mode'
* lisp/whitespace.el (whitespace-color-on): Don't use OVERRIDE in font-lock-keywords; instead, use 'prepend' in the call to 'font-lock-add-keywords'. (Bug#73332)
This commit is contained in:
parent
01ebe6de89
commit
35e356f958
1 changed files with 6 additions and 6 deletions
|
|
@ -739,7 +739,7 @@ This variable is used when `whitespace-style' includes
|
||||||
|
|
||||||
(defcustom whitespace-indentation-regexp
|
(defcustom whitespace-indentation-regexp
|
||||||
'("^\t*\\(\\( \\{%d\\}\\)+\\)[^\n\t]"
|
'("^\t*\\(\\( \\{%d\\}\\)+\\)[^\n\t]"
|
||||||
. "^ *\\(\t+\\)[^\n]")
|
. "^ *\\(\t+\\).")
|
||||||
"Regexps to match indentation whitespace that should be visualized.
|
"Regexps to match indentation whitespace that should be visualized.
|
||||||
|
|
||||||
The value should be a cons whose car specifies the regexp to match
|
The value should be a cons whose car specifies the regexp to match
|
||||||
|
|
@ -1738,7 +1738,7 @@ cleaning up these problems."
|
||||||
((eq (car option) 'space-after-tab::space)
|
((eq (car option) 'space-after-tab::space)
|
||||||
(whitespace-space-after-tab-regexp 'space))
|
(whitespace-space-after-tab-regexp 'space))
|
||||||
((eq (car option) 'missing-newline-at-eof)
|
((eq (car option) 'missing-newline-at-eof)
|
||||||
"[^\n]\\'")
|
".\\'")
|
||||||
(t
|
(t
|
||||||
(cdr option)))))
|
(cdr option)))))
|
||||||
(when (re-search-forward regexp rend t)
|
(when (re-search-forward regexp rend t)
|
||||||
|
|
@ -2174,14 +2174,14 @@ resultant list will be returned."
|
||||||
1 whitespace-space-after-tab t)))
|
1 whitespace-space-after-tab t)))
|
||||||
,@(when (memq 'missing-newline-at-eof whitespace-active-style)
|
,@(when (memq 'missing-newline-at-eof whitespace-active-style)
|
||||||
;; Show missing newline.
|
;; Show missing newline.
|
||||||
`(("[^\n]\\'" 0
|
`((".\\'" 0
|
||||||
;; Don't mark the end of the buffer is point is there --
|
;; Don't mark the end of the buffer if point is there --
|
||||||
;; it probably means that the user is typing something
|
;; it probably means that the user is typing something
|
||||||
;; at the end of the buffer.
|
;; at the end of the buffer.
|
||||||
(and (/= whitespace-point (point-max))
|
(and (/= whitespace-point (point-max))
|
||||||
'whitespace-missing-newline-at-eof)
|
'whitespace-missing-newline-at-eof)
|
||||||
t)))))
|
prepend)))))
|
||||||
(font-lock-add-keywords nil whitespace-font-lock-keywords t)
|
(font-lock-add-keywords nil whitespace-font-lock-keywords 'append)
|
||||||
(font-lock-flush)))
|
(font-lock-flush)))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue