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: Using more and/or better icons in Emacs Date: Wed, 14 Apr 2021 09:46:38 +0300 Message-ID: <834kg91hyp.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefan@marxist.se, dgutov@yandex.ru To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 14 08:47:33 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 1lWZJF-0002gI-NA for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 08:47:33 +0200 Original-Received: from localhost ([::1]:47704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWZJE-0000kI-Mm for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 02:47:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWZIb-0000K3-1Y for emacs-devel@gnu.org; Wed, 14 Apr 2021 02:46:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37810) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWZIZ-0006Xo-4s; Wed, 14 Apr 2021 02:46:51 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4535 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWZIY-0005ib-In; Wed, 14 Apr 2021 02:46:50 -0400 In-Reply-To: (message from Alan Third on Tue, 13 Apr 2021 20:50:12 +0100) 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:268025 Archived-At: > Date: Tue, 13 Apr 2021 20:50:12 +0100 > From: Alan Third > Cc: emacs-devel@gnu.org, Dmitry Gutov > > > Your patch LGTM, but I guess it would need documentation and a NEWS entry. > > Thanks again for working on this! > > Thanks. I've attached a version with documentation. I think it's good > enough but would appreciate someone else double checking it makes sense. Thanks, a few minor nits below. > --- a/doc/lispref/display.texi > +++ b/doc/lispref/display.texi > @@ -5289,6 +5289,13 @@ Image Descriptors > and values, including at least the pair @code{:type @var{type}} that > specifies the image type. > > + Image descriptors which define image dimensions, i.e. @code{:width}, > +@code{:height}, @code{:max-width} and @code{:max-height}, may take > +either a number, which represents the dimension in pixels, or a pair > +@code{(@var{value} . 'em)}, where @var{value} is the dimension's > +length in ``ems''. One ``em'' is equivalent to the height of the > +font. I would use @dfn{em} the first time, and thereafter just em, without quotes. It would also be good to have a @footnote explaining the source of the name "em". Also, VALUE can be a float, and that should be documented. > +/* Return a size in pixels either directly from the value specified by > + SYMBOL, or from a CONS of the form (VALUE . UNITS). If the value > + doesn't exist in the image spec, or is invalid, return -1. */ > +static int > +image_get_length (struct image *img, Lisp_Object symbol) The "length" part of the name defeats its mnemonic value. I suggest image_get_dimension instead. Also, I think the commentary is inaccurate or at least confusing (is it from some earlier version of the code, perhaps?).