diff --git a/emacs/.emacs.d/prot-emacs.org b/emacs/.emacs.d/prot-emacs.org index 74baa640..6f1acb2b 100644 --- a/emacs/.emacs.d/prot-emacs.org +++ b/emacs/.emacs.d/prot-emacs.org @@ -16300,8 +16300,9 @@ positions. Otherwise, copy the current line." (region-beginning) (region-end)))) (if (and beg end) - (kill-ring-save beg end) - (prot-simple-copy-line))) + (copy-region-as-kill beg end) + (prot-simple-copy-line)) + (setq this-command 'kill-ring-save)) ;;;###autoload (defun prot-simple-kill-region (&optional beg end) @@ -16337,7 +16338,8 @@ BOUNDARIES is a cons cell representing buffer positions." (prot-simple--duplicate-buffer-substring (if (region-active-p) (cons (region-beginning) (region-end)) - (cons (line-beginning-position) (line-end-position))))) + (cons (line-beginning-position) (line-end-position)))) + (setq this-command 'yank)) ;;;###autoload (defun prot-simple-yank-replace-line-or-region () @@ -16348,7 +16350,8 @@ This command can then be followed by the standard (if (use-region-p) (delete-region (region-beginning) (region-end)) (delete-region (line-beginning-position) (line-end-position))) - (yank)) + (yank) + (setq this-command 'yank)) ;;;###autoload (defun prot-simple-multi-line-below () @@ -16368,7 +16371,8 @@ This command can then be followed by the standard (defun prot-simple-kill-line-backward () "Kill from point to the beginning of the line." (interactive) - (kill-line 0)) + (kill-line 0) + (setq this-command 'kill-line)) ;;;###autoload (defun prot-simple-delete-line () @@ -16378,7 +16382,8 @@ This command can then be followed by the standard (end (line-end-position))) (if (eq point end) (delete-region point (+ end 1)) - (delete-region point end)))) + (delete-region point end))) + (setq this-command 'kill-whole-line)) ;;;###autoload (defun prot-simple-delete-line-backward () @@ -16388,7 +16393,8 @@ This command can then be followed by the standard (beg (line-beginning-position))) (if (eq point beg) (delete-region (- beg 1) point) - (delete-region point beg)))) + (delete-region point beg))) + (setq this-command 'kill-whole-line)) ;;;###autoload (define-minor-mode prot-simple-auto-fill-visual-line-mode diff --git a/emacs/.emacs.d/prot-lisp/prot-simple.el b/emacs/.emacs.d/prot-lisp/prot-simple.el index 89347105..2d2a073b 100644 --- a/emacs/.emacs.d/prot-lisp/prot-simple.el +++ b/emacs/.emacs.d/prot-lisp/prot-simple.el @@ -241,8 +241,9 @@ positions. Otherwise, copy the current line." (region-beginning) (region-end)))) (if (and beg end) - (kill-ring-save beg end) - (prot-simple-copy-line))) + (copy-region-as-kill beg end) + (prot-simple-copy-line)) + (setq this-command 'kill-ring-save)) ;;;###autoload (defun prot-simple-kill-region (&optional beg end) @@ -278,7 +279,8 @@ BOUNDARIES is a cons cell representing buffer positions." (prot-simple--duplicate-buffer-substring (if (region-active-p) (cons (region-beginning) (region-end)) - (cons (line-beginning-position) (line-end-position))))) + (cons (line-beginning-position) (line-end-position)))) + (setq this-command 'yank)) ;;;###autoload (defun prot-simple-yank-replace-line-or-region () @@ -289,7 +291,8 @@ This command can then be followed by the standard (if (use-region-p) (delete-region (region-beginning) (region-end)) (delete-region (line-beginning-position) (line-end-position))) - (yank)) + (yank) + (setq this-command 'yank)) ;;;###autoload (defun prot-simple-multi-line-below () @@ -309,7 +312,8 @@ This command can then be followed by the standard (defun prot-simple-kill-line-backward () "Kill from point to the beginning of the line." (interactive) - (kill-line 0)) + (kill-line 0) + (setq this-command 'kill-line)) ;;;###autoload (defun prot-simple-delete-line () @@ -319,7 +323,8 @@ This command can then be followed by the standard (end (line-end-position))) (if (eq point end) (delete-region point (+ end 1)) - (delete-region point end)))) + (delete-region point end))) + (setq this-command 'kill-whole-line)) ;;;###autoload (defun prot-simple-delete-line-backward () @@ -329,7 +334,8 @@ This command can then be followed by the standard (beg (line-beginning-position))) (if (eq point beg) (delete-region (- beg 1) point) - (delete-region point beg)))) + (delete-region point beg))) + (setq this-command 'kill-whole-line)) ;;;###autoload (define-minor-mode prot-simple-auto-fill-visual-line-mode