From: C K Kashyap <ckkashyap@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: emacs lisp - unable to write a function maker
Date: Fri, 16 Sep 2011 14:16:04 +0530 [thread overview]
Message-ID: <CAGdT1goiCfkJfL1PjKEWKi7H-8c0AziG0Kc=pO-fAe0U2D8xbQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Hi,
I was trying to write a function that would help in creating various
abbreviation functions.
(defun makeAbrevFun (name val)
(eval
(defun name () (insert val))))
The intention is that the below code would create a function called "aa"
(makeAbrevFun 'aa "aaaaaaaaaaaaaa")
That can be invoked by doing (aa)C-X C-e
This does not work. Could someone please let me know how I can achieve this?
Regards,
Kashyap
[-- Attachment #2: Type: text/html, Size: 617 bytes --]
next reply other threads:[~2011-09-16 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 8:46 C K Kashyap [this message]
2011-09-16 8:58 ` emacs lisp - unable to write a function maker Thien-Thi Nguyen
2011-09-16 9:26 ` C K Kashyap
2011-09-16 9:40 ` Thien-Thi Nguyen
2011-09-16 9:57 ` Eric Abrahamsen
2011-09-16 10:17 ` C K Kashyap
2011-09-16 11:19 ` Eric Abrahamsen
2011-09-16 14:06 ` Drew Adams
2011-09-23 15:31 ` Tim Landscheidt
2011-09-23 16:43 ` Drew Adams
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='CAGdT1goiCfkJfL1PjKEWKi7H-8c0AziG0Kc=pO-fAe0U2D8xbQ@mail.gmail.com' \
--to=ckkashyap@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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).