From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.help Subject: Re: making Emacs 22 startup like Emacs 21 Date: Fri, 16 Nov 2007 19:57:27 +0100 Message-ID: <87sl3681d4.fsf@gmx.de> References: <87ejey4jqn.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1195242051 21099 80.91.229.12 (16 Nov 2007 19:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2007 19:40:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 16 20:40:56 2007 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 1It73X-0001KU-54 for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Nov 2007 20:40:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1It73K-0008DG-7s for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Nov 2007 14:40:34 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: p5486424c.dip.t-dialin.net Original-X-Trace: quimby.gnus.org 1195239329 14429 84.134.66.76 (16 Nov 2007 18:55:29 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 16 Nov 2007 18:55:29 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:+vkn5hYptNVoA0TtuNSb3zgsLA0= Original-Xref: shelby.stanford.edu gnu.emacs.help:153862 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:49289 Archived-At: Kevin Rodgers writes: > Sven Joachim wrote: >> I've just put these 2¢ into my .emacs, which seem to do the trick: >> >> (when (> (length command-line-args) 1) > > That doesn't distinguish file names from other command line arguments > such as options. True, but those options are already deleted from command-line-args when the user's init file is processed. > A better test might be > > (> (length (buffer-list) 2) > > assuming that with no file name arguments just the *scratch* and > *Messages* buffers exist. That assumption is mistaken, a freshly started Emacs has six buffers: (buffer-list) => (# # # # # #) So you'd need to test (> (length (buffer-list) 6). Regards, Sven