From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master c22b735: (string-pixel-width): Rewrite to avoid side effects Date: Thu, 28 Oct 2021 16:51:46 +0300 Message-ID: <83y26ds1e5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 28 15:53:36 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mg5qZ-0000dc-A4 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 15:53:35 +0200 Original-Received: from localhost ([::1]:42422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mg5qY-0005ht-79 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 09:53:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg5oq-0003yg-Oy for emacs-devel@gnu.org; Thu, 28 Oct 2021 09:51:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg5op-0003nU-Gg; Thu, 28 Oct 2021 09:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=d8fwHaNCDUDsmpPVLCO75VsiZXDEsJXrkxcR+TiD4d4=; b=UNmv+u3HQerNeu XoKTNN70aU84woU6V/DCiaxb/bPPH4zQJg4UDyw+2+n6/YgUqGyZLjKzFYaZZJ9TYDQOuXyXSfwdO 878YYzYUvdKRtg19wYvW6Pipe4KVYWMoAp9vtaQemoslrFMQwI020Yq7KO78rsAsaFnEyyMUYZ8fT nQsZf0js429FeFpwP+6YqrGD+/t31SAvoIFtcN1t2D9bTIo57cKJ8cnXdm89XAyeiYF+FPYQziEXv 444vNWvfvG6R+HecYYv59EYmYYQ6dXw4/J6sl7M1ej01/gKuzg/IoHm2ElwlD8ssqZYiYYF1GpK4v QlGryHQ4lbyVS09bD9fw==; Original-Received: from [87.69.77.57] (port=3246 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg5oo-0002gx-6J; Thu, 28 Oct 2021 09:51:47 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278104 Archived-At: > * src/xdisp.c (Fwindow_text_pixel_size): Allow `window` to be a buffer. > * lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify accordingly. Bother: this doesn't make sure w->contents is the current buffer, which I think many display routines assume without checking (or barf if it isn't true). So I think this is unsafe.