all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* calling similar function
@ 2006-07-08  2:54 scm
  2006-07-08  4:07 ` Giorgos Keramidas
  2006-07-08  4:11 ` Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: scm @ 2006-07-08  2:54 UTC (permalink / raw)


Greetings,

I was wondering if someone could shed some light on how I could call an
interactive function by another interactive function. I want to do this
to save on some coding, as the two functions are identical except their
names.

Here is the function I want to call:

(defun list (command)
  (interactive "sCommand> ")
    (if (string-match "ls" command)
        (shell-command "ls")))

Here is my attempt at coding an interactive calling function.

(defun list-foo ()
  (interactive)
  (list))

I want to be able to M-x list-foo and have list be called.

Thanks in advance to anyone who has the time to lend to this question.

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

end of thread, other threads:[~2006-07-08  4:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-08  2:54 calling similar function scm
2006-07-08  4:07 ` Giorgos Keramidas
2006-07-08  4:11 ` 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.