bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12387: 24.2.50; File column printed by list-buffers is bad if done i


From: Eli Zaretskii
Subject: bug#12387: 24.2.50; File column printed by list-buffers is bad if done in dired-mode
Date: Thu, 13 Sep 2012 20:07:38 +0300

> Date: Thu, 13 Sep 2012 11:37:07 +0200
> From: martin rudalics <rudalics@gmx.at>
> Cc: 12387@debbugs.gnu.org, emacs18@gmail.com
> 
> Does the patch below fix it?
> 
> martin
> 
> === modified file 'src/xdisp.c'
> --- src/xdisp.c       2012-09-12 00:14:50 +0000
> +++ src/xdisp.c       2012-09-13 09:31:34 +0000
> @@ -21039,8 +21039,7 @@
>       : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
>       : DEFAULT_FACE_ID;
> 
> -  if (XBUFFER (buffer) != current_buffer)
> -    old_buffer = current_buffer;
> +  old_buffer = current_buffer;
> 
>     /* Save things including mode_line_proptrans_alist,
>        and set that to nil so that we don't alter the outer value.  */
> @@ -21051,8 +21050,7 @@
>     mode_line_proptrans_alist = Qnil;
> 
>     Fselect_window (window, Qt);
> -  if (old_buffer)
> -    set_buffer_internal_1 (XBUFFER (buffer));
> +  set_buffer_internal_1 (XBUFFER (buffer));
> 
>     init_iterator (&it, w, -1, -1, NULL, face_id);

IMO, that's exactly what needs to be done.  The attempts to avoid
calling set_buffer_internal_1 are a classical case of premature
optimization, since that function already knows how to avoid changing
to the same buffer.





reply via email to

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