From 9d9f289b26d3246e6e1b9d7fc87141a7619bd9dc Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 10 Oct 2014 00:00:58 +0200 Subject: [PATCH] Add copy-func-prototype defun --- init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.el b/init.el index f04a09a..5ac0c51 100644 --- a/init.el +++ b/init.el @@ -215,3 +215,14 @@ (interactive) (beginning-of-line) (kill-line 1)) + +(defun copy-func-prototype () + "Copy the current function's prototype to the kill-ring" + + (interactive) + + (save-excursion (beginning-of-defun) + (setq protocopy-begin (point)) + (forward-list) + (setq protocopy-end (point)) + (kill-ring-save protocopy-begin protocopy-end)))