lh-insert.el (560B)
1 ;; -*- lexical-binding: t; -*- 2 3 (defun lh/insert-random-sha1 () 4 "Insert a random sha1 sum at point" 5 (interactive) 6 (insert (sha1 (number-to-string (random))))) 7 8 (defun lh/insert-number-from-register-format (register format-string) 9 (interactive (list (register-read-with-preview "Insert register: ") 10 (read-string "Format String: "))) 11 (let ((val (get-register register))) 12 (insert (format format-string val)))) 13 14 (defun lh/insert-json-encoded (obj) 15 (interactive "MData: ") 16 (insert (json-serialize obj))) 17 18 (provide 'lh-insert)