help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fire defun by typing keyword


From: Emanuel Berg
Subject: Fire defun by typing keyword
Date: Wed, 30 Oct 2013 03:38:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Is it possible to fire off a defun by typing a specific
keyword? Sort of like the way abbrev works?

For example, I have a defun like this

(defun date ()
  (interactive)
  (insert-shell-command "my_date") )

where "my_date" is a script to format output from
/bin/date.

Now, my idea is to hook it to a keyword, say "thedate".

Again, it would work just as abbrev, only instead of a
table lookup and replace, it would trigger a defun.

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]