unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable.
@ 2020-04-23 20:24 Igor Saprykin
  2020-04-25  9:34 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Saprykin @ 2020-04-23 20:24 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

Hello!

I noticed some unnecessary code when browsing through the sources.  It
is generally good to remove it.  I believe the attached patch cleans
it up.  I tested by doing `make clean`.  I also read through the
CONTRIBUTE file and the appropriate commit message seems to be the
one-liner.  Thanks!

Best,
Igor Saprykin

[-- Attachment #2: 0001-ftfont.c-ftfont_lookup_cache-Eliminate-unnecessary-v.patch --]
[-- Type: text/x-patch, Size: 1112 bytes --]

From 32c8c753910fb417e5e5eb6b97c7d0aab63b5af7 Mon Sep 17 00:00:00 2001
From: Igor Saprykin <sheleztt@gmail.com>
Date: Thu, 23 Apr 2020 13:00:26 -0700
Subject: [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary
 variable.

Copyright-paperwork-exempt: yes
---
 src/ftfont.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/ftfont.c b/src/ftfont.c
index 6b549c3ddf..696f5e6534 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -346,18 +346,15 @@ ftfont_resolve_generic_family (Lisp_Object family, FcPattern *pattern)
 static Lisp_Object
 ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
 {
-  Lisp_Object cache, val, entity;
+  Lisp_Object cache, val;
   struct ftfont_cache_data *cache_data;
 
   if (FONT_ENTITY_P (key))
     {
-      entity = key;
-      val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
+      val = assq_no_quit (QCfont_entity, AREF (key, FONT_EXTRA_INDEX));
       eassert (CONSP (val));
       key = XCDR (val);
     }
-  else
-    entity = Qnil;
 
   if (NILP (ft_face_cache))
     cache = Qnil;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable.
  2020-04-23 20:24 [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable Igor Saprykin
@ 2020-04-25  9:34 ` Eli Zaretskii
  2020-04-25 14:23   ` Igor Saprykin
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-04-25  9:34 UTC (permalink / raw)
  To: Igor Saprykin; +Cc: emacs-devel

> From: Igor Saprykin <sheleztt@gmail.com>
> Date: Thu, 23 Apr 2020 13:24:00 -0700
> 
> I noticed some unnecessary code when browsing through the sources.  It
> is generally good to remove it.  I believe the attached patch cleans
> it up.  I tested by doing `make clean`.  I also read through the
> CONTRIBUTE file and the appropriate commit message seems to be the
> one-liner.  Thanks!

Thanks, pushed to the master branch.

The log message had a couple of minor issues, see the text I actually
committed.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable.
  2020-04-25  9:34 ` Eli Zaretskii
@ 2020-04-25 14:23   ` Igor Saprykin
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Saprykin @ 2020-04-25 14:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Great.  Thank you, Eli!

On Sat, Apr 25, 2020 at 2:34 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Igor Saprykin <sheleztt@gmail.com>
> > Date: Thu, 23 Apr 2020 13:24:00 -0700
> >
> > I noticed some unnecessary code when browsing through the sources.  It
> > is generally good to remove it.  I believe the attached patch cleans
> > it up.  I tested by doing `make clean`.  I also read through the
> > CONTRIBUTE file and the appropriate commit message seems to be the
> > one-liner.  Thanks!
>
> Thanks, pushed to the master branch.
>
> The log message had a couple of minor issues, see the text I actually
> committed.
>

[-- Attachment #2: Type: text/html, Size: 1035 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-25 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 20:24 [PATCH] * ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable Igor Saprykin
2020-04-25  9:34 ` Eli Zaretskii
2020-04-25 14:23   ` Igor Saprykin

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).