From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: add-hook Date: Sat, 26 Jan 2013 08:03:59 +0400 Message-ID: <87k3r0mvyo.fsf@yandex.ru> References: <902E1C3E-E017-4109-9904-803220E5EE58@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359173065 1835 80.91.229.3 (26 Jan 2013 04:04:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jan 2013 04:04:25 +0000 (UTC) Cc: 'Emacs help' To: "Drew Adams" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 26 05:04:44 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tyx0T-00025A-5y for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Jan 2013 05:04:41 +0100 Original-Received: from localhost ([::1]:45105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyx0A-0006yK-O0 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2013 23:04:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyx02-0006xM-0R for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 23:04:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tywzy-0000KV-45 for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 23:04:13 -0500 Original-Received: from mail-bk0-f42.google.com ([209.85.214.42]:64402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tywzx-0000KH-SL for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 23:04:10 -0500 Original-Received: by mail-bk0-f42.google.com with SMTP id ji2so593506bkc.15 for ; Fri, 25 Jan 2013 20:04:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=mHNfILkBswYmiL5BxtnCVuGla80L0fYSP85ytp2zcFw=; b=jYGZ0KlIjv7/NUEUstEQB1X9agmND+NBX3Wa90mE++s1A7RUGp/S34DWNuIWTCGfrX rUhu3MC7ub4hzQvdBQCFpOzOEnwkxiTCvL8zXOraHjM4nvRVcDrL2E6/hrMkVKhgEW3a wmmrQM6mf2s+1PmcEMSmp2k19OR4r5YG23As163pSxKdyn+89W/ale/HKlqfeSNrWvOO ZroSyCgzEQVabFNRpdKaBTDFhhb1cVWRD0p/Zq7sR5Q48MIkg60yRnObUNoZFUJIh6VJ Ho93JHixAh46LiCugZ4MY5TZxRKxLirfsd0RkDaOR9ZGX6T3YQclfLVtGKpq5sxSovad M+UQ== X-Received: by 10.204.131.74 with SMTP id w10mr2346588bks.4.1359173047342; Fri, 25 Jan 2013 20:04:07 -0800 (PST) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPS id y11sm2411937bkw.8.2013.01.25.20.04.04 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jan 2013 20:04:06 -0800 (PST) In-Reply-To: (Drew Adams's message of "Fri, 25 Jan 2013 11:18:57 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.214.42 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88822 Archived-At: "Drew Adams" writes: > If HOOK is void then it is initialized to nil. > > (add-hook 'ruby-mode-hook (lambda () (ruby-electric-mode t))) Or, even shorter: (add-hook 'ruby-mode-hook 'ruby-electric-mode)