From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 dc78779c0c: Fix SVG scaling (bug#59802) Date: Sat, 17 Dec 2022 17:51:44 +0800 Message-ID: <87len6fjdb.fsf@yahoo.com> References: <167120580083.8436.12355011753442988358@vcs2.savannah.gnu.org> <20221216155001.8BDCAC0060F@vcs2.savannah.gnu.org> <87tu1ug6rz.fsf@yahoo.com> <83cz8iighg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24222"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, manuel@ledu-giraud.fr To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 17 10:52:52 2022 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 1p6TsB-00064f-VO for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Dec 2022 10:52:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6TrN-0008P3-JW; Sat, 17 Dec 2022 04:52:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6TrM-0008Ov-Bc for emacs-devel@gnu.org; Sat, 17 Dec 2022 04:52:00 -0500 Original-Received: from sonic305-20.consmr.mail.ne1.yahoo.com ([66.163.185.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6TrK-0004pT-Gz for emacs-devel@gnu.org; Sat, 17 Dec 2022 04:52:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1671270715; bh=nCpsn/oTNugv/bVIEdFuYfmHvSaucnjsdq9hyhQHEMU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=lBUyhLiHxndcGvXTyp+/XqnNFmRIOBq8omn0KIahneGLP2BWJp+9eRtU4binNGFzmmAaw5FuNIbnQgRziaV/fzr0lZraq8M373jiXYO6zor2GJEiYW3HEpvMYyGkRHN/N+HdsX0uubTK/5dfLbRpcS0+Q6EeczfmITfXyqcLrJjmK8A6n2lvegFxKcU7sgUg80Y6bxVnbPJFIRHKlWFMJeMGnRkJh/1qEuDy9JTKiXGNlAhK7sxc4u4t8E/AIK/MWwDaqk2BgXjBapldGIyZ5+CBaVG5lcq/E+iC5BfFsECBrQ3WEMNzppF7iceDP/NyqVd9LDNefv+0yJvfby+DgA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1671270715; bh=ec6p7zwese4kSNhYJ+f060Fm2Gabz6pBfVCquSQ757Y=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=fU8Mjndp2FYCgA9Vg6oJjiF5HOlk8bAUYM1rP97zx/ujFLeIgx2LsMzmPw2FmKShPGs6c6iyTYn4M32o4KfB/nWfix0USyAQJhDDR38Om6cmoknnm5pNz1VcgvE9z+XrTTFzOwyNuQ7VAyCV/+LFyoWltOSu2t4Rhmdq9hJkjIIJKF10MCBGLS/4HC/g9ay/YOmlfqFXeErUE3D9XjzhesIXkb2F6Zh4/ObrT2ncZiQkAObkFDnZB/Qd66WQbk7g8UgWOK2OUaka4nTxZxj+nZZAq7xAmUwD85WURqKYLrko7Q/iCNqfWccDpQxDDUXSabtN5E0bDv/pU91wbnTzpA== X-YMail-OSG: mpo3H1sVM1lgcukqdZ2JShaIAMnF3prIrr6_qQAS_Ue02Z7Rk1Ou8uTxPX4GEPe sg9JF0tjiZ2v5s9AsMrJ9Ar13WaXGvOzFmjc_QOw8ocsVEfe1g1Pag3SfBwJ3IR5sYuUEEkazlRf ByERygNszydRX3lnetKEEOFvTFji1UtYnK0NN3bVcTuktH9P5cW6G_X3WtS1ywMiFPk47tFIgdNT ChcUS3fxK7c42KibL4U8UBbk_.FJoWDTfAusHKSkmI7kSH4U83f6EQYSmzjjdoF8hZi5zonG8icH Div7jcnRFvajFwza1m_gQkpKnxJve701g57SaQXRdG.84iZobmdhdHbpmfS5UBM7eoV4a_bUTXGr zbbUD97e8YRH1kA3xhYKQJUToWeIkJowbr7RUdWvMa2F.XL3aPYa2gbWAoNcmXaH7YT_ySEH.fsS etrUejDHPEmrzfY5jPmTWXe6x9d443FlbIwSjbF6lXOP9jh0yq9G8H7cdJeIv6Mr9H7wET1qnBxC gUg6hAdQexX9tVrvSM.nWdwWbv4Lzg3CagueYRqoDLxDI._Vvgb4CpycE9EmYtIMepn69zYMEi0O QQUQG17u0OwqM0evBJLrO8Srt5.mQO1DYuOQUfvFPIy1X3sJRwXpXBWmeqXIXtAD01QvXLffRJ4B 6jF5dR1yGrPTiG6NAk1QRI7S2YCAff67d0MUkdIhtCSWeylRfQOI9G0lbnSRSWt1Qp3JRHy936An JQtZ4udSySXsa6IYE.SUCn42pyOrl_W7.mBeR1SkvgCr7KLV1tTP8YnqwF4h19E38RVzh4IqxuB7 wW775E0t2XoBu19r1QFM0ZuVsmZVrfqwwJRe8zzANQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sat, 17 Dec 2022 09:51:55 +0000 Original-Received: by hermes--production-sg3-b666c6484-prndz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cad734611dfd6b6c629ac716e6942ea6; Sat, 17 Dec 2022 09:51:49 +0000 (UTC) In-Reply-To: <83cz8iighg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Dec 2022 10:25:47 +0200") X-Mailer: WebService/1.1.20982 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.146; envelope-from=luangruo@yahoo.com; helo=sonic305-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301551 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: Manuel Giraud >> Date: Sat, 17 Dec 2022 09:26:08 +0800 >> >> Eli Zaretskii writes: >> >> > + if (! (0 < viewbox_width) && (iwidth.unit == RSVG_UNIT_PERCENT)) >> > + viewbox_width = (viewbox_height * viewbox.width / viewbox.height) >> > + * iwidth.length; >> > + else if (! (0 < viewbox_height) && (iheight.unit == RSVG_UNIT_PERCENT)) >> > + viewbox_height = (viewbox_width * viewbox.height / viewbox.width) >> > + * iheight.length; >> >> Our style is to write: >> >> viewbox_width = ((viewbox_height * viewbox.width / viewbox.height) >> * iwidth.length); >> >> and not: >> >> viewbox_width = (viewbox_height * viewbox.width / viewbox.height) >> * iwidth.length; > > There's nothing wrong with the original style, although I agree that > using extra parentheses makes it more plausible. There's no reason to > be so stringent in insisting on the other style. The GNU coding standards seem to say something else: Insert extra parentheses so that Emacs will indent the code properly. For example, the following indentation looks nice if you do it by hand, v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; but Emacs would alter it. Adding a set of parentheses produces something that looks equally nice, and which Emacs will preserve: v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);