1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix hl-line tests

* lisp/hl-line.el (hl-line-mode): Restore old setter.
* test/lisp/hl-line-tests.el (hl-line-tests-verify): Don't rely
`cl-some' always returning t on success.
(hl-line-tests-sticky-across-frames): Use correct global variable.
This commit is contained in:
Po Lu 2022-03-23 20:25:33 +08:00
parent b49d249ee5
commit 5811741eda
2 changed files with 15 additions and 4 deletions

View file

@ -102,7 +102,15 @@ This variable has no effect in Global Highlight Line mode.
For that, use `global-hl-line-sticky-flag'."
:type 'boolean
:version "22.1"
:group 'hl-line)
:group 'hl-line
:set (lambda (symbol value)
(set-default symbol value)
(unless value
(let ((selected (window-buffer (selected-window))))
(dolist (buffer (buffer-list))
(unless (eq buffer selected)
(with-current-buffer buffer
(hl-line-unhighlight))))))))
(defcustom global-hl-line-sticky-flag nil
"Non-nil means the Global HL-Line mode highlight appears in all windows.