diff options
author | Po Lu <luangruo@yahoo.com> | 2022-03-24 13:50:55 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-03-24 13:50:55 +0800 |
commit | 72ab6c4f141ce249c34933d1ebc91e2491e34b3a (patch) | |
tree | 3d50a7556b31d8354b96f1cedfc94449713882c3 | |
parent | 97f9eeaaefebf5f3852b062535f7c041831609bd (diff) | |
download | emacs-72ab6c4f141ce249c34933d1ebc91e2491e34b3a.tar.gz |
Fix setter for hl-line-sticky-flag when hl-line is not loaded
* lisp/hl-line.el (hl-line-sticky-flag): Wrap most of setter
around (featurep 'hl-line). Reported by Michael Heerdegen
<michael_heerdegen@web.de>.
-rw-r--r-- | lisp/hl-line.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/hl-line.el b/lisp/hl-line.el index e42d1d97d9d..e5ca6819f0d 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -105,12 +105,13 @@ For that, use `global-hl-line-sticky-flag'." :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)))))))) + (when (featurep 'hl-line) + (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. |