[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: From mode-line-format to string?

From: Miles Bader
Subject: Re: From mode-line-format to string?
Date: 06 Sep 2002 11:18:27 +0900

Kevin Rodgers <address@hidden> writes:
> ;;; Description:
> ;;;
> ;;; Emacs doesn't provide distinct functions for (1) generating a string
> ;;; from `mode-line-format' and (2) displaying it in the mode line.  In
> ;;; src/xdisp.c, display_mode_element() does both, and it doesn't have a
> ;;; Lisp binding.

Note that the CVS version of emacs now provides a lisp-callable
function for this, `format-mode-line':

   format-mode-line is a built-in function.
   (format-mode-line &optional FORMAT WINDOW NO-PROPS)

   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.  Second optional arg WINDOW specifies a
   different window to use as the context for the formatting.
   If third optional arg NO-PROPS is non-nil, string is not propertized.

o The existentialist, not having a pillow, goes everywhere with the book by
  Sullivan, _I am going to spit on your graves_.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]