From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fren Zeee Newsgroups: gmane.emacs.devel Subject: How to make a mode dependent operation ? Date: Sat, 4 Dec 2010 11:50:58 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1291492272 8504 80.91.229.12 (4 Dec 2010 19:51:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 19:51:12 +0000 (UTC) To: "Emacs Dev [emacs-devel]" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 04 20:51:08 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1POy8P-00074o-Vh for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 20:51:06 +0100 Original-Received: from localhost ([127.0.0.1]:50874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POy8P-000343-Gt for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 14:51:05 -0500 Original-Received: from [140.186.70.92] (port=42737 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POy8K-00033x-LN for emacs-devel@gnu.org; Sat, 04 Dec 2010 14:51:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POy8J-0003G5-Ig for emacs-devel@gnu.org; Sat, 04 Dec 2010 14:51:00 -0500 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:64827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POy8J-0003Fy-EJ for emacs-devel@gnu.org; Sat, 04 Dec 2010 14:50:59 -0500 Original-Received: by iwn33 with SMTP id 33so1153140iwn.0 for ; Sat, 04 Dec 2010 11:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ME1PCALGDdM8PtTvEWeQ/9d3ivFexsOtwVqAg3l/AUg=; b=RBzBvaqEEfV1eLHEQ+S9ZYNbT38U02cAuHrIC9oMJn3zwjXo36Mo+hsDUtMKQeyiS6 oJrr6oEfG/yC3TSY0pRl+gW9lyC0iA1Lq3vmxxBzchiohSjJAjrSl1Eks4QUN077G7jV TPpvOzsCAtBLGkNACroDWe3tbaLyFAxc5HHgE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=KrLY/C9Liqm/yjBsUZLVT/vnR4x3IigedbVhulLqMq8n0RxgxI58dzbLmdbeDYMxA0 BhPbH0nx+axL3fXZHpA+iFNS0t5vDzAk3SNp+DimZcHRGwSazlT6xfYiyliDuRJdHaFa C/FwKTxIX6jd8oU754irYxb2Ffb+HBHEugba4= Original-Received: by 10.231.16.131 with SMTP id o3mr3590294iba.38.1291492258822; Sat, 04 Dec 2010 11:50:58 -0800 (PST) Original-Received: by 10.231.35.195 with HTTP; Sat, 4 Dec 2010 11:50:58 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133414 Archived-At: Here is a simple newbie problem : In c-mode, I want to insert a skeleton of function as () { } and In lisp-mode, I want ( defun () "" ) and similarly in scheme, java, python, haskell, pascal ... What is the quick but maybe not the dirty way to do it ? What is the PRO way to do it ? I have heard a little about the hooking hooks :) What is a hook and what is proper place of use ? Is it appropriate for this kind of private customization ? Franz