unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Perry Smith <pedzsan@gmail.com>
To: Emacs help <help-gnu-emacs@gnu.org>
Subject: add-hook
Date: Fri, 25 Jan 2013 13:03:09 -0600	[thread overview]
Message-ID: <902E1C3E-E017-4109-9904-803220E5EE58@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 1486 bytes --]

             reply	other threads:[~2013-01-25 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 19:03 Perry Smith [this message]
2013-01-25 19:18 ` add-hook Drew Adams
2013-01-26  4:03   ` add-hook Dmitry Gutov
     [not found]   ` <mailman.18346.1359173059.855.help-gnu-emacs@gnu.org>
2013-01-26  5:33     ` add-hook Barry Margolin
2013-01-26  6:21       ` add-hook Dmitry Gutov
  -- strict thread matches above, loose matches on Subject: below --
2011-06-04 13:00 add-hook daniele.g
2011-06-04 14:11 ` add-hook Teemu Likonen
2011-06-04 18:35   ` add-hook daniele.g
2011-06-05 10:58     ` add-hook Richard Riley
2011-06-05 18:58       ` add-hook daniele.g
2011-06-05 20:26         ` add-hook Richard Riley
2011-06-05 22:28           ` add-hook daniele.g
2011-06-05 23:33             ` add-hook Richard Riley
     [not found] <mailman.1634.1181129906.32220.help-gnu-emacs@gnu.org>
2007-06-06 12:04 ` add-hook Katsumi Yamaoka
2007-06-06 20:41 ` add-hook Robert D. Crawford
2007-06-06 11:26 add-hook Sebastian Tennant
2007-06-07  0:20 ` add-hook Sebastian Tennant
     [not found] ` <mailman.1696.1181175524.32220.help-gnu-emacs@gnu.org>
2007-06-07  7:16   ` add-hook Thien-Thi Nguyen
2007-06-07 10:00     ` add-hook Sebastian Tennant
     [not found]     ` <mailman.1711.1181210337.32220.help-gnu-emacs@gnu.org>
2007-06-07 14:01       ` add-hook Thien-Thi Nguyen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=902E1C3E-E017-4109-9904-803220E5EE58@gmail.com \
    --to=pedzsan@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).