all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org,  manuel@ledu-giraud.fr
Subject: Re: emacs-29 dc78779c0c: Fix SVG scaling (bug#59802)
Date: Sat, 17 Dec 2022 17:51:44 +0800	[thread overview]
Message-ID: <87len6fjdb.fsf@yahoo.com> (raw)
In-Reply-To: <83cz8iighg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Dec 2022 10:25:47 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: Manuel Giraud <manuel@ledu-giraud.fr>
>> Date: Sat, 17 Dec 2022 09:26:08 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> 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);



  reply	other threads:[~2022-12-17  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167120580083.8436.12355011753442988358@vcs2.savannah.gnu.org>
     [not found] ` <20221216155001.8BDCAC0060F@vcs2.savannah.gnu.org>
2022-12-17  1:26   ` emacs-29 dc78779c0c: Fix SVG scaling (bug#59802) Po Lu
2022-12-17  8:25     ` Eli Zaretskii
2022-12-17  9:51       ` Po Lu [this message]
2022-12-17 10:38         ` Eli Zaretskii
2022-12-17 17:18           ` Manuel Giraud
2022-12-17 17:53             ` Eli Zaretskii
2022-12-18  3:23         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87len6fjdb.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.