From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: format-mode-line Date: Wed, 5 Jan 2005 01:25:06 +1300 Message-ID: <16858.35618.823283.184368@farnswood.snap.net.nz> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1104842074 5596 80.91.229.6 (4 Jan 2005 12:34:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2005 12:34:34 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 04 13:34:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ClntG-0004n1-00 for ; Tue, 04 Jan 2005 13:34:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clo4S-00061v-Sv for ged-emacs-devel@m.gmane.org; Tue, 04 Jan 2005 07:45:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Clo3s-0005kM-CQ for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:45:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Clo3p-0005iz-IN for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:45:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clo3o-0005hc-SR for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:45:16 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Clnr9-0004M1-Ie for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:32:11 -0500 Original-Received: from farnswood.snap.net.nz (p189-tnt1.snap.net.nz [202.124.110.189]) by viper.snap.net.nz (Postfix) with ESMTP id A1C50182DA0 for ; Wed, 5 Jan 2005 01:32:05 +1300 (NZDT) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 6AEB3628AD; Tue, 4 Jan 2005 12:25:08 +0000 (GMT) Original-To: emacs-devel@gnu.org X-Mailer: VM 7.19 under Emacs 21.3.50.24 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31814 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31814 The documentation says: > format-mode-line is a built-in function in `C source code'. > (format-mode-line &optional FORMAT WINDOW NO-PROPS BUFFER) > Return the mode-line of selected window as a string. > First optional arg FORMAT specifies a different format string (see > `mode-line-format' for details) to use. If format is t, return > the buffer's header-line. AFAIK FORMAT need not be a string. The manual also says: > If FORMAT is `nil', that means to use `mode-line-format' This does not seem to make sense because if header-line-format is nil then (format-mode-line header-line-format) will presumably return the mode-line of selected window as a string. In any case, (format-mode-line) does not seem to give the right thing, although (format-mode-line mode-line-format) does. I suggest changing format-mode-line so that FORMAT is not optional and not give a special meaning to nil and t. I think format-mode-line is currently always used with a value for FORMAT. If this is a good idea, I offer to do it and post my patch here. Nick