unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: kgold@watson.ibm.com (kgold)
Subject: Re: Inserting standard blocks of text.
Date: 28 Apr 2003 20:24:08 GMT	[thread overview]
Message-ID: <b8k2l8$dr4$1@news.btv.ibm.com> (raw)
In-Reply-To: mailman.5231.1051372238.21513.help-gnu-emacs@gnu.org


(define-key esc-map "K" 'insert-kgold-header)

(defun insert-kgold-header ()
  "Insert header at the current cursor position in the current buffer."
  (interactive)
  (insert 
   "Your standard header ..."
   )
  (insert "\n")
  )

If it's a function header, you then most likely want to have
another function which cut and pastes the function name and parameters into
your header.

Bonus: You can insert a file using:

	C-x i runs the command insert-file

so you don't have to do your "open, copy, switch, paste" anyway.

"Michael Solem" <msolem@linuxmail.org> writes:
> Is there a way to have a block of text that can be pasted in a file
> at any time (something that will not be overwritten when you do a
> Ctrl-k etc...).  I would like to put a standard header in fron of
> all my functions when I'm programming.  It will always be the
> same. It would be nice to not have to open a file, copy the header,
> switch back to the file I'm working on, and then paste it in.
> Thanks.

-- 
-- 
Ken Goldman   kgold@watson.ibm.com   914-784-7646

  parent reply	other threads:[~2003-04-28 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5231.1051372238.21513.help-gnu-emacs@gnu.org>
2003-04-28 14:47 ` Inserting standard blocks of text jason haslup
2003-04-28 20:24 ` kgold [this message]
2003-04-26 15:49 Michael Solem
2003-04-26 22:49 ` Leandro Guimarães Faria Corsetti Dutra
2003-04-27  9:35 ` Oliver Lohmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='b8k2l8$dr4$1@news.btv.ibm.com' \
    --to=kgold@watson.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).