comparison lisp/emulation/vi.el @ 707:e4253da532fb

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 10 Jun 1992 02:47:07 +0000
parents fec3f9a1e3e5
children 9c89fd7ddd41
comparison
equal deleted inserted replaced
706:86cb5db0b6c3 707:e4253da532fb
1075 (let ((reg (vi-prefix-char-value arg)) put-text) 1075 (let ((reg (vi-prefix-char-value arg)) put-text)
1076 (if (and reg (or (< reg ?1) (> reg ?9)) (null (get-register reg))) 1076 (if (and reg (or (< reg ?1) (> reg ?9)) (null (get-register reg)))
1077 (error "Nothing in register %c" reg) 1077 (error "Nothing in register %c" reg)
1078 (if (null reg) (setq reg ?1)) ; the default is the last text killed 1078 (if (null reg) (setq reg ?1)) ; the default is the last text killed
1079 (setq put-text 1079 (setq put-text
1080 (if (and (>= reg ?1) (<= reg ?9)) 1080 (cond
1081 (let ((ring-length (length kill-ring))) 1081 ((and (>= reg ?1) (<= reg ?9))
1082 (setq this-command 'yank) ; So we may yank-pop !! 1082 (setq this-command 'yank) ; So we may yank-pop !!
1083 (nth (% (+ (- reg ?0 1) (- ring-length 1083 (current-kill (- reg ?0 1) 'do-not-rotate))
1084 (length kill-ring-yank-pointer))) 1084 ((stringp (get-register reg)) (get-register reg))
1085 ring-length) kill-ring)) 1085 (t (error "Register %c is not containing text string" reg))))
1086 (if (stringp (get-register reg))
1087 (get-register reg)
1088 (error "Register %c is not containing text string" reg))))
1089 (if (vi-string-end-with-nl-p put-text) ; put back text as lines 1086 (if (vi-string-end-with-nl-p put-text) ; put back text as lines
1090 (if after-p 1087 (if after-p
1091 (progn (next-line 1) (beginning-of-line)) 1088 (progn (next-line 1) (beginning-of-line))
1092 (beginning-of-line)) 1089 (beginning-of-line))
1093 (if after-p (forward-char 1))) 1090 (if after-p (forward-char 1)))