From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: add-hook Date: Fri, 25 Jan 2013 13:03:09 -0600 Message-ID: <902E1C3E-E017-4109-9904-803220E5EE58@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_AEE0FF8D-599C-43A4-BEBD-9B6A5D8F0CD0" X-Trace: ger.gmane.org 1359141000 18565 80.91.229.3 (25 Jan 2013 19:10:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2013 19:10:00 +0000 (UTC) To: Emacs help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 25 20:10:18 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 1TyofJ-00063m-Sg for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2013 20:10:17 +0100 Original-Received: from localhost ([::1]:51836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyof2-0003z5-5r for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2013 14:10:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyoew-0003yT-HE for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 14:09:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tyoeu-0006MS-Vl for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 14:09:54 -0500 Original-Received: from mail-ia0-x22a.google.com ([2607:f8b0:4001:c02::22a]:52881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyoeu-0006Lx-NC for help-gnu-emacs@gnu.org; Fri, 25 Jan 2013 14:09:52 -0500 Original-Received: by mail-ia0-f170.google.com with SMTP id k20so1115915iak.1 for ; Fri, 25 Jan 2013 11:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:subject:date:message-id:to :mime-version:x-mailer; bh=KUuDadt4JUjbVhaCy11f+fB2yGEGjTUZqAANqs6rKJI=; b=AEkqg95Qg2dYXFa5ZRJdnXUcQgkLBLIantN3lHJhkN0ZzRhsY++Pc79DNeGBHIqZIm Onmm4skRUTZp1leyDsv+38JQmkMep5t8YFtBIllCUhimyG4ho3sp15oAparVMOeYDoh1 zomQuCDKVk856PmCWxLMmYGfd+ED571stJEFPeDHnC2o7kw3tF7dCHka8VKJVVj76PMe DXYhVLlzWxsax5khhwvg8B7+4o+T8ZdQpTO0E55gcRmMH1ud5AugwCFm0EKFraW687tN tR1ewbXTk3qg0chAIIb4tg0TMH/w3eEIPmQcS15kx/Nw1n6GOXZeE3zRVukmMJ9ulBnq xIRg== X-Received: by 10.43.125.133 with SMTP id gs5mr4084702icc.54.1359140591823; Fri, 25 Jan 2013 11:03:11 -0800 (PST) Original-Received: from magicbook.austin.ibm.com ([32.97.110.54]) by mx.google.com with ESMTPS id df6sm4297218igb.15.2013.01.25.11.03.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jan 2013 11:03:11 -0800 (PST) X-Mailer: Apple Mail (2.1283) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::22a 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:88813 Archived-At: --Apple-Mail=_AEE0FF8D-599C-43A4-BEBD-9B6A5D8F0CD0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii In one of my setup files I have this: > (eval-after-load 'ruby-mode > '(add-hook 'ruby-mode-hook (function > (lambda () > (ruby-electric-mode t))))) Other places, I just do the add-hook. The reason I'm asking is because I need to do: > (eval-after-load 'grep > '(add-to-list 'grep-files-aliases (cons "rails" "*.rb *.erb *.js = *.css *.scss"))) because if I don't, I get an error that says grep-files-aliases is not = defined. It appears as if add-hook has smarts that add-to-list does not = have but I wanted to be sure which method was preferred. Thank you, Perry --Apple-Mail=_AEE0FF8D-599C-43A4-BEBD-9B6A5D8F0CD0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii In = one of my setup files I have this:

(eval-after-load 'ruby-mode
  '(add-hook = 'ruby-mode-hook (function
=      (lambda ()
= (ruby-electric-mode = t)))))

Other places, I just do = the add-hook.

The reason I'm asking is because = I need to do:

(eval-after-load 'grep
  '(add-to-list = 'grep-files-aliases (cons "rails" "*.rb *.erb *.js *.css = *.scss")))

b= ecause if I don't, I get an error that says grep-files-aliases is not = defined.  It appears as if add-hook has smarts that add-to-list = does not have but I wanted to be sure which method was = preferred.

Thank = you,
Perry

= --Apple-Mail=_AEE0FF8D-599C-43A4-BEBD-9B6A5D8F0CD0--