[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Emacs incompatibilty

From: Emanuel Berg
Subject: Re: Another Emacs incompatibilty
Date: Tue, 25 Aug 2020 07:04:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

> One-liners are enough (preferable, even) if they show
> how to do it.

Here is a 19-liner how to do it:


(defun delete-selection-pre-hook ()
  (when (and delete-selection-mode
             (not buffer-read-only) )
    (if (member this-command '(self-insert-command insert-char insert) )
        (delete-selection-helper 'kill)
       (and (symbolp this-command)
            (get this-command 'delete-selection) )))))

Now type:

  You better belive Manny is the best hacker around

mark it, type something, and yank it.

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]