all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs lisp - unable to write a function maker
@ 2011-09-16  8:46 C K Kashyap
  2011-09-16  8:58 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 10+ messages in thread
From: C K Kashyap @ 2011-09-16  8:46 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-23 16:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16  8:46 emacs lisp - unable to write a function maker C K Kashyap
2011-09-16  8:58 ` 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.