Skip to content

Instantly share code, notes, and snippets.

View macsf's full-sized avatar

Sutthichok Wongthavorn macsf

View GitHub Profile
@macsf
macsf / sw-email.el
Created April 14, 2012 11:49
Attach region or whole buffer to new mail.
(defun mail-current-buffer ()
(interactive)
(save-excursion
(if (region-active-p)
(kill-ring-save (region-beginning) (region-end))
(kill-ring-save (point-min) (point-max)))
(mail)
(next-line 3)
(yank)