help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add-hook


From: Barry Margolin
Subject: Re: add-hook
Date: Sat, 26 Jan 2013 00:33:55 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 Dmitry Gutov <address@hidden> wrote:

> "Drew Adams" <address@hidden> 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)

Not the same. With no argument it toggles, with an argument it turns the 
mode on or off as specified by the argument.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]