[Top][All Lists]

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

Re: BUG REPORT: "delsel.el"

From: Richard Stallman
Subject: Re: BUG REPORT: "delsel.el"
Date: Mon, 03 Mar 2003 13:58:59 -0500

    +  (unless transient-mark-mode
    +    (setq mark-active nil)
    +    (run-hooks 'deactivate-mark-hook))

To quote the doc string of delete-selection-mode:

    When Delete Selection mode is enabled, Transient Mark mode is also
    enabled and typed text replaces the selection if the selection is

So putting (unless transient-mark-mode ...) around that code in
delete-active-region is equivalent to deleting it.  That can't be

I do not actually use delsel mode.
Does this replacement function work right?

(defun delete-active-region (&optional killp)
  (if killp
      (kill-region (point) (mark))
    (delete-region (point) (mark)))
  (when mark-active
    (setq mark-active nil)
    (run-hooks 'deactivate-mark-hook))

reply via email to

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