[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrap around and comment function
From: |
Harry Putnam |
Subject: |
Re: Wrap around and comment function |
Date: |
Wed, 30 Nov 2005 07:55:52 -0600 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Chong Yidong <cyd@stupidchicken.com> writes:
[...]
> Probably something like this:
>
> (defun foo (beg end string)
> (interactive "*r\nsEnter a few words: ")
> (let ((fin (copy-marker end)))
> (goto-char beg)
> (insert "[HP DATE - NOTE: " string "\n")
> (goto-char (marker-position fin))
> (set-marker fin nil)
> (insert "\n==* END HP NOTE *== ]\n")
> (comment-region beg (point))))
Yup, that is pretty slick. Looks like I just need to save a
formatted date in a var and use it at:
[HP MYVAR - NOTE:
Thank you. Nice function and surprisingly brief.