unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Apparent bug in `format-mode-line'.
@ 2005-05-19  2:04 Luc Teirlinck
  2005-05-20 21:57 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2005-05-19  2:04 UTC (permalink / raw)


I believe that the following is a bug.  I do not know enough about mode
line stuff to fix it myself:

ELISP> (format-mode-line '(10 "12" "34" "56"))
"12        3456"
ELISP> 

I believe that the return value should have been:

"123456    "

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Apparent bug in `format-mode-line'.
  2005-05-19  2:04 Apparent bug in `format-mode-line' Luc Teirlinck
@ 2005-05-20 21:57 ` Richard Stallman
  2005-05-21  0:24   ` Luc Teirlinck
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2005-05-20 21:57 UTC (permalink / raw)
  Cc: emacs-devel

Does this fix it?

*** xdisp.c	17 May 2005 17:21:44 -0400	1.1009
--- xdisp.c	20 May 2005 16:37:42 -0400	
***************
*** 16033,16039 ****
  		   && --limit > 0
  		   && (precision <= 0 || n < precision))
  	      {
! 		n += display_mode_element (it, depth, field_width - n,
  					   precision - n, XCAR (elt),
  					   props, risky);
  		elt = XCDR (elt);
--- 16033,16044 ----
  		   && --limit > 0
  		   && (precision <= 0 || n < precision))
  	      {
! 		n += display_mode_element (it, depth,
! 					   /* Do padding only after the last
! 					      elements in the list.  */
! 					   (! CONSP (XCDR (elt))
! 					    ? field_width - n
! 					    : 0),
  					   precision - n, XCAR (elt),
  					   props, risky);
  		elt = XCDR (elt);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Apparent bug in `format-mode-line'.
  2005-05-20 21:57 ` Richard Stallman
@ 2005-05-21  0:24   ` Luc Teirlinck
  0 siblings, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2005-05-21  0:24 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:

   Does this fix it?

Yes, it does.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-21  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19  2:04 Apparent bug in `format-mode-line' Luc Teirlinck
2005-05-20 21:57 ` Richard Stallman
2005-05-21  0:24   ` Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).