From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: use of symbolic display elements in ruler-mode Date: 19 Mar 2004 02:50:37 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <29778733.1079621543146.JavaMail.www@wwinf0403> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079657842 21006 80.91.224.253 (19 Mar 2004 00:57:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Mar 2004 00:57:22 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 19 01:57:18 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B48K6-0000rS-00 for ; Fri, 19 Mar 2004 01:57:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B48K5-0003l5-00 for ; Fri, 19 Mar 2004 01:57:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B48IF-0005St-1T for emacs-devel@quimby.gnus.org; Thu, 18 Mar 2004 19:55:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B48Hc-0005Pp-PE for emacs-devel@gnu.org; Thu, 18 Mar 2004 19:54:44 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B48FS-0004kk-UZ for emacs-devel@gnu.org; Thu, 18 Mar 2004 19:53:02 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B48E8-0004Hk-Iw for emacs-devel@gnu.org; Thu, 18 Mar 2004 19:51:08 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 33687262832; Fri, 19 Mar 2004 01:50:55 +0100 (CET) Original-To: david.ponce@wanadoo.fr In-Reply-To: <29778733.1079621543146.JavaMail.www@wwinf0403> Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20591 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20591 David PONCE writes: > Hi Stefan, > > > Why not just: > > > > (defvar ruler-mode-ruler-function 'ruler-mode-ruler > > "Function to call to return ruler string.") > > (defconst ruler-mode-header-line-format > > '(:eval (funcall ruler-mode-ruler-function)) > > "`header-line-format' used in ruler mode.") > > Of course! Here is a new patch. I just installed some changes to the :align-to and :width space display properties. And added support for non-window systems. Specifically, (scroll-bar . x) and (*-fringe . x) no longer exists. Instead, you have to include scroll-bar and *-fringe in the proper spots yourself. Note that you can include nil in the header-line-format list, as long as the first element of the list is a string (just put "" there). Something like: Replace lsb and rsb by: (sb (ruler-mode-space 'scroll-bar 'face 'ruler-mode-pad-face)) and use (if (nth 2 (window-fringes)) ;; fringes outside margins. (list "" (and (eq scroll-bar-mode 'left) sb) lf lm ruler rm rf (and (eq scroll-bar-mode 'right) sb)) ;; fringes inside margins. (list "" (and (eq scroll-bar-mode 'left) sb) lm lf ruler rf rm (and (eq scroll-bar-mode 'right) sb))))) -- Kim F. Storm http://www.cua.dk