[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a function to enter string
From: |
Gary Wessle |
Subject: |
a function to enter string |
Date: |
20 Feb 2007 07:27:52 +1100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hi
I have this key macro in my emacs which puts "#include <string>" in
the first blank line in the buffer, also another key macro which puts
the string "std::string" at the point.
(fset 'str
[?\M-<?\M-} ?# ?i ?n ?c ?l ?u ?d ?e ? ?< ?s ?t ?r ?i ?n ?g ?>
return])
(fset ':s
"std::string")
I want when I type M-x :s which is the second key macro above, it
puts the string "std::string" at point as well as checks to see if
"#include <string>" is at the top of the buffer, if not it inserts
it so that I don't have to do it.
how can this be done?
many thanks.
- a function to enter string,
Gary Wessle <=