emacs-devel
[Top][All Lists]
Advanced

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

Re: Native line numbers landed on master


From: Juanma Barranquero
Subject: Re: Native line numbers landed on master
Date: Tue, 1 Oct 2019 10:55:51 +0200

BTW, this:

      else if (lnum_to_display % 10 == 0)
        tem_it.face_id = tenth_lnum_face_id;
      else if (lnum_to_display % 5 == 0)
        tem_it.face_id = fifth_lnum_face_id;
      else
        tem_it.face_id = lnum_face_id;

could also be written

      else if (lnum_to_display % 5 != 0)
        tem_it.face_id = lnum_face_id;
      else if (lnum_to_display % 10 == 0)
        tem_it.face_id = tenth_lnum_face_id;
      else /* lnum_to_display % 5 == 0 */
        tem_it.face_id = fifth_lnum_face_id;

with the idea that 80% of lines fall into the linum_face_id case, so it's better to have it first. But I suspect it's a micro-optimization best left to modern compilers.


On Tue, Oct 1, 2019 at 10:49 AM Juanma Barranquero <address@hidden> wrote:

Here's a version with NEWS, doc, and the face names you proposed.

An example of use:

image.png

reply via email to

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