[Arcana] yank it all wrong

Roland McGrath roland at frob.com
Fri Dec 19 01:05:36 CST 2008


This is wrong on so many levels.

(defun yank-this (s)
  (interactive (list (let ((kill-ring kill-ring))
		       (read-from-minibuffer
			"Yank: " (car kill-ring-yank-pointer)
			nil nil
			(cons 'kill-ring
			      (- (length kill-ring)
				 (length kill-ring-yank-pointer)))
			nil t))))
  (setq kill-ring-yank-pointer (or (member s kill-ring)
				   (error "Not a kill" s)))
  (setq this-command 'yank)
  (yank))




More information about the Arcana mailing list