this command always kills the current region."
;; Pass mark first, then point, because the order matters when
;; calling `kill-append'.
- (interactive (list (mark) (point) 'region))
- (unless (or region (and beg end))
- (user-error "The mark is not set now, so there is no region"))
+ (interactive (progn
+ (let ((beg (mark))
+ (end (point)))
+ (unless (and beg end)
+ (user-error "The mark is not set now, so there is no region"))
+ (list beg end 'region))))
(condition-case nil
(let ((string (if region
(funcall region-extract-function 'delete)