From: Sebastian Tennant <sebyte@smolny.plus.com>
To: help-gnu-emacs@gnu.org
Subject: Re: help
Date: Thu, 13 Dec 2007 21:16:10 +0200 [thread overview]
Message-ID: <8763z2csn9.fsf@moley.moleskin.org> (raw)
In-Reply-To: 789346.73591.qm@web63411.mail.re1.yahoo.com
Quoth HANS jackman <hansjackman@yahoo.com>:
> i just want to know how to create interfaces with Emacs and how to
> create functions and calling them.
Type:
C-h f <function-name> RET
or,
M-x describe-function RET <function-name> RET
for a short description about a function.
C-h f defun RET
"defun is a special form in `C source code'.
(defun NAME ARGLIST [DOCSTRING] BODY...)
Define NAME as a function.
The definition is (lambda ARGLIST [DOCSTRING] BODY...).
See also the function `interactive'."
Here's an example function definiton:
(defun foo (bar baz) "Join strings" (let ((fum (concat bar " " baz)))
(message "%s" fum)))
^ ^ ^ |________________________________|
| | | |
| | | |
NAME ARGLIST DOCSTRING BODY
Copy this function definition to the *scratch* buffer, place point (the
cursor) below it and type:
C-j
to 'evalute' the function. The word 'foo' should appear.
Now type:
(foo "hello" "world")
C-j
and the string "hello world" should appear.
Congratulations!
You have just written, evaluated and called your first function.
Hope this helps,
Sebastian
P.S. C-h is the key sequence Ctrl-h ('Ctrl' key + 'h' key, together)
next prev parent reply other threads:[~2007-12-13 19:16 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 5:42 help HANS jackman
2007-12-13 17:38 ` help Mike Mattie
2007-12-13 19:16 ` Sebastian Tennant [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-13 2:43 help josh parson
2023-01-16 4:25 ` help Richard Stallman
2023-01-16 5:20 ` help Jim Porter
2016-05-07 15:07 Help 庄 子恒
2016-05-08 4:03 ` Help Kaushal Modi
2016-05-08 7:12 ` Help Guillermo Vaya
2016-05-08 13:39 ` Help John Mastro
2016-05-09 0:47 ` Help Emanuel Berg
2016-05-09 8:42 ` Help Dejan Jocic
2016-05-09 9:30 ` Help Bob Proulx
2016-05-09 10:03 ` Help Dejan Jocic
2016-05-10 5:36 ` Help Bob Proulx
2016-05-10 6:09 ` Help Dejan Jocic
2016-05-10 23:17 ` Help Emanuel Berg
2016-05-11 8:57 ` Help Dejan Jocic
2016-05-14 3:52 ` Help Emanuel Berg
2016-05-11 0:31 ` Help John Mastro
2016-05-11 8:45 ` Help Dejan Jocic
2016-05-14 3:49 ` Help Emanuel Berg
[not found] <mailman.80.1454259641.17556.emacs-orgmode@gnu.org>
2016-01-31 21:51 ` Help Heartsayer
[not found] <mailman.1794.1443178478.19560.help-gnu-emacs@gnu.org>
2015-09-25 11:07 ` help Joost Kremers
2015-09-25 7:18 help ss
2015-09-25 11:00 ` help tomas
2015-09-27 17:21 ` help Artur Malabarba
2015-09-27 17:49 ` help Marcin Borkowski
2015-09-27 18:28 ` help Artur Malabarba
2015-09-27 20:02 ` help Marcin Borkowski
2015-09-28 1:37 ` help Kaushal Modi
2015-09-28 11:03 ` help Artur Malabarba
2014-09-02 16:07 help Moritz Kiefer
2014-10-12 12:10 ` help Bastien
[not found] <mailman.771.1263114721.18930.help-gnu-emacs@gnu.org>
2010-01-10 9:57 ` Help Cecil Westerhof
2010-01-10 22:36 ` Help Tim X
2010-01-20 16:52 ` Help Matt Proud
2010-01-05 16:17 Help Rhey, David
2010-01-05 19:11 ` Help Tassilo Horn
2008-06-09 16:36 Help ila
2008-06-09 19:47 ` Help Xah
2008-06-10 0:29 ` Help Nikolaj Schumacher
2008-06-10 17:01 ` Help Joel J. Adamson
2008-06-09 16:00 help 江林
2008-06-09 19:39 ` help Xah
[not found] <mailman.2698.1177883418.7795.help-gnu-emacs@gnu.org>
2007-04-29 22:07 ` Help Harald Hanche-Olsen
2007-04-29 6:45 Help Mahesh HM
2005-08-03 14:07 Help Rich Hojsack
2005-12-15 15:35 ` Help Kevin Rodgers
2004-12-15 12:53 help fisherssml
2004-06-08 7:52 Help patrizia d'ippolito
2005-12-13 23:32 ` Help Richard M. Stallman
2005-12-14 7:55 ` Help Juri Linkov
2005-12-14 16:34 ` Help Kevin Rodgers
2005-12-14 19:15 ` Help Eli Zaretskii
2005-12-15 2:07 ` Help Richard M. Stallman
2005-12-15 8:16 ` Help Werner LEMBERG
2002-10-20 7:57 Help swk
2002-10-24 13:01 ` Help Jesper Harder
2002-10-24 21:45 ` Help swk
2002-10-29 21:56 ` Help swk
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763z2csn9.fsf@moley.moleskin.org \
--to=sebyte@smolny.plus.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.
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.