unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to load a minor-mode at startup
@ 2008-12-30 17:13 Aurélien Bottazini
  2008-12-31  0:34 ` Ian Eure
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aurélien Bottazini @ 2008-12-30 17:13 UTC (permalink / raw)
  To: help-gnu-emacs

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

 I am an emacs beginner.

I can't find a way to load one of my minor mode automatically.
It's whitespace-mode coming from whitespace.el.

in my init.el I have put:
(require 'whitespace)

I have tried to put after it something like
(whitespace-mode)
or (whitespace-mode t) but it does not work.

I always have to activate whitespace-mode by hand with
 M-x whitespace-mode

I think there is a simple way to do it but I am missing it.
Can someone help me?

Thanks!

Aurélien

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to load a minor-mode at startup
  2008-12-30 17:13 how to load a minor-mode at startup Aurélien Bottazini
@ 2008-12-31  0:34 ` Ian Eure
  2008-12-31  4:33 ` Kevin Rodgers
  2009-01-03 16:07 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Eure @ 2008-12-31  0:34 UTC (permalink / raw)
  To: Aurélien Bottazini; +Cc: help-gnu-emacs

On Dec 30, 2008, at 9:13 AM, Aurélien Bottazini wrote:

> I am an emacs beginner.
>
> I can't find a way to load one of my minor mode automatically.
> It's whitespace-mode coming from whitespace.el.
>
> in my init.el I have put:
> (require 'whitespace)
>
> I have tried to put after it something like
> (whitespace-mode)
> or (whitespace-mode t) but it does not work.
>
> I always have to activate whitespace-mode by hand with
> M-x whitespace-mode
>
> I think there is a simple way to do it but I am missing it.
> Can someone help me?
>

-- snip --
(whitespace-mode &optional arg)

Toggle whitespace minor mode visualization ("ws" on modeline).

If arg is null, toggle whitespace visualization.
If arg is a number greater than zero, turn on visualization;
otherwise, turn off visualization.
Only useful with a windowing system.
-- snip --

So what you want is:

(whitespace-mode 1)

- Ian



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to load a minor-mode at startup
  2008-12-30 17:13 how to load a minor-mode at startup Aurélien Bottazini
  2008-12-31  0:34 ` Ian Eure
@ 2008-12-31  4:33 ` Kevin Rodgers
  2009-01-03 16:07 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2008-12-31  4:33 UTC (permalink / raw)
  To: help-gnu-emacs

Aurélien Bottazini wrote:
>  I am an emacs beginner.
> 
> I can't find a way to load one of my minor mode automatically.
> It's whitespace-mode coming from whitespace.el.
> 
> in my init.el I have put:
> (require 'whitespace)
> 
> I have tried to put after it something like
> (whitespace-mode)
> or (whitespace-mode t) but it does not work.
> 
> I always have to activate whitespace-mode by hand with
>  M-x whitespace-mode

In which buffer(s) do you want to use whitespace mode?

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to load a minor-mode at startup
  2008-12-30 17:13 how to load a minor-mode at startup Aurélien Bottazini
  2008-12-31  0:34 ` Ian Eure
  2008-12-31  4:33 ` Kevin Rodgers
@ 2009-01-03 16:07 ` Kevin Rodgers
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2009-01-03 16:07 UTC (permalink / raw)
  To: help-gnu-emacs

Aurélien Bottazini wrote:
>  I am an emacs beginner.
> 
> I can't find a way to load one of my minor mode automatically.
> It's whitespace-mode coming from whitespace.el.
> 
> in my init.el I have put:
> (require 'whitespace)
> 
> I have tried to put after it something like
> (whitespace-mode)
> or (whitespace-mode t) but it does not work.
> 
> I always have to activate whitespace-mode by hand with
>  M-x whitespace-mode

What version of Emacs are you using?  In Emacs 22.3, whitespace.el does
not define a function called whitespace-mode.  It does define a command
called whitespace-global-mode, which sounds like what you want.

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-03 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-30 17:13 how to load a minor-mode at startup Aurélien Bottazini
2008-12-31  0:34 ` Ian Eure
2008-12-31  4:33 ` Kevin Rodgers
2009-01-03 16:07 ` Kevin Rodgers

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).