Search code examples
emacselisp

How to remove the top entry (pop) from the emacs kill-ring?


I need to replace the top killed string to another one. I can (yank) it and then (kill-region ...), but after that, there will be two strings: the old one, and my new. How to remove the old entry completely from the kill-ring?


Solution

  • It can be as simple as

    (pop kill-ring)