daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defun add-attribution ()
  2.   (interactive)
  3.   (save-excursion
  4.     (let ((start-id (point))
  5.       (attribution-username (user-login-name (user-uid)))
  6.       (attribution-prefix "")
  7.       (attribution-suffix ":  ")
  8.       (attribution (concat attribution-username
  9.                    attribution-prefix
  10.                    attribution-suffix)))
  11.       (insert attribution)
  12.       (setq attribution-end-point (point))
  13.       (comment-region start-id (point))))
  14.   (goto attribution-end-point))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top