]> git.eshelyaron.com Git - emacs.git/commit
kill-whole-line: Honor visibility; fix kill-ring when read-only (bug#65734)
authorSebastian Miele <iota@whxvd.name>
Wed, 19 Jun 2024 13:48:59 +0000 (15:48 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 28 Jun 2024 05:49:39 +0000 (07:49 +0200)
commit420d291103c2b5d8ac08e5e61badfb7d469b44bf
tree5d0e59ead1bf1def3f7d9bb40ab879513a6d5b26
parent82ac38e66490f4ff86aa252627647ec03e3a847d
kill-whole-line: Honor visibility; fix kill-ring when read-only (bug#65734)

* lisp/simple.el (kill-whole-line): Use visibility state before
performing any edits as reference instead of expecting that visibility
cannot change.  First of the two calls to `kill-region' may trigger
`after-change-functions' that might alter the visibility state.
Make sure that we populate the `kill-ring' with the contents of the
whole line when buffer is in `read-only-mode'.

(cherry picked from commit 058bb4ca25adb8f4bf78cc0f09a65d730dbd797d)
lisp/simple.el