From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Tennant Newsgroups: gmane.emacs.help Subject: Re: help Date: Thu, 13 Dec 2007 21:16:10 +0200 Message-ID: <8763z2csn9.fsf@moley.moleskin.org> References: <789346.73591.qm@web63411.mail.re1.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197573420 14353 80.91.229.12 (13 Dec 2007 19:17:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Dec 2007 19:17:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 13 20:17:11 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J2tYU-00023f-Cr for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Dec 2007 20:17:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2tYC-00037d-0P for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Dec 2007 14:16:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2tXv-00037Q-SA for help-gnu-emacs@gnu.org; Thu, 13 Dec 2007 14:16:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2tXt-00037E-EQ for help-gnu-emacs@gnu.org; Thu, 13 Dec 2007 14:16:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2tXt-00037B-8i for help-gnu-emacs@gnu.org; Thu, 13 Dec 2007 14:16:33 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J2tXt-0004pP-16 for help-gnu-emacs@gnu.org; Thu, 13 Dec 2007 14:16:33 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J2tXf-0006cf-HY for help-gnu-emacs@gnu.org; Thu, 13 Dec 2007 19:16:19 +0000 Original-Received: from 85.105.17.65 ([85.105.17.65]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Dec 2007 19:16:19 +0000 Original-Received: from sebyte by 85.105.17.65 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Dec 2007 19:16:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.105.17.65 User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:jBKlO+2ry4Wwlt7drFfIHbJYCSI= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50079 Archived-At: Quoth HANS jackman : > i just want to know how to create interfaces with Emacs and how to > create functions and calling them. Type: C-h f RET or, M-x describe-function RET 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)