From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ritchie Newsgroups: gmane.emacs.help Subject: Re: enable outline-minor-mode at startup Date: Tue, 3 Feb 2009 20:14:07 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1233722456 17469 80.91.229.12 (4 Feb 2009 04:40:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2009 04:40:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 04 05:42:09 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUZaQ-0004ZE-DI for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Feb 2009 05:42:06 +0100 Original-Received: from localhost ([127.0.0.1]:45295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUZZ7-0007d0-Fn for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 23:40:45 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!s9g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: 66.215.153.172 Original-X-Trace: posting.google.com 1233720847 1584 127.0.0.1 (4 Feb 2009 04:14:07 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 4 Feb 2009 04:14:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s9g2000prg.googlegroups.com; posting-host=66.215.153.172; posting-account=CuLrKQoAAACxi2VsGphG0_-Zo9Puh4B0 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:166583 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61897 Archived-At: On Feb 3, 7:21=A0pm, Kevin Rodgers wrote: > Ritchie wrote: > > I'm wondering if there is a way to enable the outline-minor-mode at > > startup. Without it, when I try to hide function body using command > > "hide-subtree", the hided function looks as if it is empty. Outline- > > minor-mode will have "..." indicating the body is hidden. When I put > > (outline-minor-mode 1) in .emacs, there is no effect, I still have to > > start it manually for each buffer. > > > Anybody know how to start outline-minor-mode automatically? Or, is > > there other methods are used for hiding function bodies? > > 1. (add-hook 'FOO-mode-hook (lambda () (outline-minor-mode 1))) > > =A0 =A0 where FOO-mode is the relevant major mode. > > 2. (add-hook 'find-file-hook (lambda () (outline-minor-mode 1))) > =A0 =A0 (add-hook 'find-file-not-found-functions > =A0 =A0 =A0 =A0 =A0 =A0 =A0(lambda () (progn (outline-minor-mode 1) nil))= ) > > 3. Or try define-globalized-minor-mode. > > -- > Kevin Rodgers > Denver, Colorado, USA They worked great !! I really appreciate it ! regards - R