Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun zone-pgm-putz-with-case ()
- (goto-char (point-min))
- (while (not (input-pending-p))
- (let ((np (+ 2 (random 5)))
- (pm (point-max)))
- (while (< np pm)
- (goto-char np)
- (let ((prec (preceding-char))
- (props (text-properties-at (1- (point)))))
- (insert (if (zerop (random 2))
- (upcase prec)
- (downcase prec)))
- (set-text-properties (1- (point)) (point) props))
- (backward-char 2)
- (delete-char 1)
- (setq np (+ np (1+ (random 5))))))
- (goto-char (point-min))
- (sit-for 0 2)))
- (defun zone-putz-with-case ()
- (goto-char (point-min))
- (while (not (input-pending-p))
- (let ((np (+ 2 (random 5)))
- (pm (point-max)))
- (while (< np pm)
- (goto-char np)
- (let ((prec (preceding-char)))
- (delete-char -1)
- (insert (if (zerop (random 2))
- (upcase prec)
- (downcase prec))))
- (setq np (+ np (1+ (random 5))))))
- (goto-char (point-min))
- (sit-for 0 2)))
- (defvar +test-alphabet+ "abcdefg")
- (defun zone-putz-with-letters ()
- (setq alph +test-alphabet+)
- (goto-char (point-min))
- (while (not (input-pending-p))
- (let ((np (+ 2 (random 5)))
- (pm (point-max)))
- (while (< np pm)
- (goto-char np)
- (delete-char -1)
- (insert-char (aref alph (random (length alph))))
- (setq np (+ np (1+ (random 5))))
- ))
- (goto-char (point-min))
- (sit-for 0 2)))
- (insert (upcase prec))
- (insert (aref `[,prec ,prec ,(upcase prec) ,prec] 2))
- (insert (upcase (preceding-char)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement