GNU bug report logs -
#69097
[PATCH] Add 'kill-region-or-word' command
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Tue, 13 Feb 2024 09:57:02 UTC
Severity: normal
Tags: patch
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Thanks for the new command!
Sorry, I meant the new option.
> I'd like to use it, but currently can't
> because I have customized 'mark-even-if-inactive' to nil.
This small fix addresses the remaining issues:
diff --git a/lisp/simple.el b/lisp/simple.el
index 9fbd9bfb577..40266f37209 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5865,7 +5865,7 @@ kill-region
;; Pass mark first, then point, because the order matters when
;; calling `kill-append'.
(interactive (progn
- (let ((beg (mark))
+ (let ((beg (mark kill-region-dwim))
(end (point)))
(cond
((and kill-region-dwim (not (use-region-p)))
@@ -5888,10 +5888,12 @@ kill-region
((filter-buffer-substring beg end 'delete)))))
(when string ;STRING is nil if BEG = END
;; Add that string to the kill ring, one way or another.
- (if (eq last-command 'kill-region)
+ (if (and (null kill-region-dwim)
+ (eq last-command 'kill-region))
(kill-append string (< end beg))
(kill-new string)))
- (when (or string (eq last-command 'kill-region))
+ (when (and (null kill-region-dwim)
+ (or string (eq last-command 'kill-region)))
(setq this-command 'kill-region))
(setq deactivate-mark t)
nil)
This bug report was last modified 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.