Commit 95af181d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/emulation/cua-base.el (cua-delete-region): Use delete-active-region.

(cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove.

Fixes: debbugs:18886
parent 08f55805
2014-10-31 Stefan Monnier <>
* emulation/cua-base.el (cua-delete-region): Use delete-active-region
(cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove.
2014-10-31 Eli Zaretskii <>
* (repo-update): Fix a typo and slightly reword
......@@ -790,26 +790,12 @@ Repeating prefix key when region is active works as a single prefix key."
;;; Region specific commands
(defvar cua--last-deleted-region-pos nil)
(defvar cua--last-deleted-region-text nil)
(defun cua-delete-region ()
"Delete the active region.
Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil."
(let ((start (mark)) (end (point)))
(or (<= start end)
(setq start (prog1 end (setq end start))))
(setq cua--last-deleted-region-text
(funcall region-extract-function t))
(if cua-delete-copy-to-register-0
(set-register ?0 cua--last-deleted-region-text))
(setq cua--last-deleted-region-pos
(cons (current-buffer)
(and (consp buffer-undo-list)
(car buffer-undo-list))))
(/= start end)))
(require 'delsel)
(defun cua-copy-region (arg)
"Copy the region to the kill ring.
......@@ -1357,9 +1343,6 @@ If ARG is the atom `-', scroll upward by nearly full screen."
c-beginning-of-statement c-end-of-statement))
(put cmd 'CUA 'move))
;; Only called if pc-selection-mode is t, which means pc-select is loaded.
(declare-function pc-selection-mode "pc-select" (&optional arg))
;; State prior to enabling cua-mode
;; Value is a list with the following elements:
;; delete-selection-mode
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment