Emacs: how to delete text without kill ring?

后端 未结 15 1079
旧巷少年郎
旧巷少年郎 2020-12-04 14:00

I\'d like to just delete some text so I can yank some other text instead of it. How can I do that? C-w cuts the selected text to kill ring and I end up with

15条回答
  •  情歌与酒
    2020-12-04 14:53

    I have had the same issue. The closest thing I've got so far is to just make a small function that's essentially:

    (defun ruthlessly-kill-line ()
      "Deletes a line, but does not put it in the kill-ring. (kinda)"
      (interactive)
      (move-beginning-of-line 1)
      (kill-line 1)
      (setq kill-ring (cdr kill-ring)))
    

提交回复
热议问题