From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.help Subject: Re: Open Outline-mode file in collapsed state Date: Sat, 29 Mar 2008 17:12:10 +0100 Message-ID: <877iflzezp.fsf@bzg.ath.cx> References: <86abkntrcs.fsf@timbral.net> <86od90b5wy.fsf@timbral.net> <02bf0d38-92a9-4c06-9d64-22109d8df255@8g2000hse.googlegroups.com> <86fxucaqz3.fsf@timbral.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206807224 5674 80.91.229.12 (29 Mar 2008 16:13:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2008 16:13:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Evans Winner Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 17:14:15 2008 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 1Jfdh6-0008PG-Lu for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 17:14:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfdgU-0006c4-UP for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 12:13:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfdfJ-00066n-J9 for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 12:12:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfdfH-00065v-QN for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 12:12:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfdfH-00065p-Gi for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 12:12:19 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.154]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfdfH-0008Px-4h for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 12:12:19 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so971554fga.30 for ; Sat, 29 Mar 2008 09:12:18 -0700 (PDT) Original-Received: by 10.82.184.2 with SMTP id h2mr10791951buf.1.1206807137959; Sat, 29 Mar 2008 09:12:17 -0700 (PDT) Original-Received: from bzg.ath.cx ( [129.199.12.136]) by mx.google.com with ESMTPS id o11sm4688478fkf.9.2008.03.29.09.12.16 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 29 Mar 2008 09:12:17 -0700 (PDT) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 9B717157978; Sat, 29 Mar 2008 17:12:10 +0100 (CET) In-Reply-To: <86fxucaqz3.fsf@timbral.net> (Evans Winner's message of "Thu, 27 Mar 2008 13:48:00 -0600") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:52798 Archived-At: Evans Winner writes: > `hide-sublevels' used non-interactively actually does take > one argument[1]. Missed that, sorry. So the right solution is the one you already mentioned: (add-hook 'outline-mode-hook '(lambda () (hide-sublevels 1))) Just out of curiosity: using both an (interactive) form and a mandatory argument looks unclean to me. I would expect an (interactive "s") form when the first argument is not optional (and is expected to be a string) or only optional arguments when (interactive) is used. Is there any clean way to decide on this? -- Bastien