diff options
author | Jim Blandy <jimb@redhat.com> | 1992-06-10 02:47:07 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-06-10 02:47:07 +0000 |
commit | 492878e483c355e6851d72cb4e395f069cd02964 (patch) | |
tree | 2baa750cf47f09df16d5c89e719e4c81e23d67ca /lisp/emulation | |
parent | 4de86b16296516788a3c65d98b13464c4462549a (diff) | |
download | emacs-492878e483c355e6851d72cb4e395f069cd02964.tar.gz |
*** empty log message ***
Diffstat (limited to 'lisp/emulation')
-rw-r--r-- | lisp/emulation/vi.el | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index fb76742c295..37293e9008f 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -1077,15 +1077,12 @@ If the optional after-p is given, put after/below the cursor." (error "Nothing in register %c" reg) (if (null reg) (setq reg ?1)) ; the default is the last text killed (setq put-text - (if (and (>= reg ?1) (<= reg ?9)) - (let ((ring-length (length kill-ring))) - (setq this-command 'yank) ; So we may yank-pop !! - (nth (% (+ (- reg ?0 1) (- ring-length - (length kill-ring-yank-pointer))) - ring-length) kill-ring)) - (if (stringp (get-register reg)) - (get-register reg) - (error "Register %c is not containing text string" reg)))) + (cond + ((and (>= reg ?1) (<= reg ?9)) + (setq this-command 'yank) ; So we may yank-pop !! + (current-kill (- reg ?0 1) 'do-not-rotate)) + ((stringp (get-register reg)) (get-register reg)) + (t (error "Register %c is not containing text string" reg)))) (if (vi-string-end-with-nl-p put-text) ; put back text as lines (if after-p (progn (next-line 1) (beginning-of-line)) |