From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jesse Medeiros Newsgroups: gmane.emacs.devel Subject: Patch to vertically center line content when using line-spacing variable Date: Sat, 31 Aug 2019 18:53:46 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="161440"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 31 23:54:37 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i4BKO-000frk-Um for ged-emacs-devel@m.gmane.org; Sat, 31 Aug 2019 23:54:37 +0200 Original-Received: from localhost ([::1]:46496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4BKN-0005Zw-Si for ged-emacs-devel@m.gmane.org; Sat, 31 Aug 2019 17:54:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43961) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4BJn-0005Zm-Kf for emacs-devel@gnu.org; Sat, 31 Aug 2019 17:54:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4BJm-00007v-Cm for emacs-devel@gnu.org; Sat, 31 Aug 2019 17:53:59 -0400 Original-Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:44800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4BJm-00007b-95 for emacs-devel@gnu.org; Sat, 31 Aug 2019 17:53:58 -0400 Original-Received: by mail-qk1-x730.google.com with SMTP id i78so7911872qke.11 for ; Sat, 31 Aug 2019 14:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=p8PeNWSHixn658NzxtPuQbWIV9nwjbEoYgjLu9SKR4M=; b=ZXh9D6Fv4Tr5wk9aYTQjFe8to1J04ggqWaTbHu7/P6pXvgvnwz9dqlnOllbdlFFLII XLqp/QGFT60uNB3T0ep4ru1htt4HXzUs1S21UyfULLvYxbqu0kYFBmdoGtfQwvYF8Cmo cE6l3QMjlfSTPaBu6wkue8Zq5zCircZmIh4ZRXIP9VbheXI/6WzGHaPctnKl1LaJqOaS EMLmMQi+V5sgf+XRpu7Yr7JnKtlux9eeUOgNZLqXMnVXeDBI5IeLXWaJfLculE6ms2TH jbtnRqM6fS6s3Mfg6Jsy+uBhU49tppQG8iYXTr4Tjmz892QMXUWjvQtyuzXEFBdr2Y0A Fr9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=p8PeNWSHixn658NzxtPuQbWIV9nwjbEoYgjLu9SKR4M=; b=FIHvokeZ2P/3txzoQ0QKfcbBSjJc1jcd2EJ9sIsnABAIyrR3H/+r/BTODQa7A8e7bG Hb0Rw9p9AwiYyPj8EaqZm5i0+l0H1kAEy7/okx4S2GIMYau5huQ/texAYJVi1X/YSpXu f2EJsGpU3EPDjkf4pojxfLVGQPiAAMziru4ZiJr72qt4rTqE7hvs5wg06S4FVkOCoXxq PHEV0BNOk98Z9kKSVTUFlc5UJTWNXbGspkgU8GiFPPYGKh8uJ0t2tvzkbqK5dL30Z+XA a8uIAoVZi2R1gyNLu/cNhoUA+twabjTbD3QeOEoctH52TFD7Vkp4ss2JbnmGr9oHV4ZD akmg== X-Gm-Message-State: APjAAAVlmO22tj+gRCzdp08lfgAgANum8f2yGgprOXMvz2npv0Ph/ZUx cWI3t+r9UhiFEfsHLwnFAUFCBRd5Fn13k7Z/0C/NG+oMPrE= X-Google-Smtp-Source: APXvYqzpvx5sYcaJm3qCzDn5GsYwUcFH7uXfDt3hP2F3hAzPOPaff66hQWlOY+gmfO72DC6WuIIFd/qDzp/2xqPFvpM= X-Received: by 2002:a37:49c6:: with SMTP id w189mr22421847qka.477.1567288437091; Sat, 31 Aug 2019 14:53:57 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::730 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239735 Archived-At: When you set the line-spacing variable, Emacs only adds margin to the bottom of the line, which always annoyed me. So I decided to work on this and wrote a patch to vertically center the line when setting the line-spacing variable. I created a new variable called line-spacing-vertical-center, and the centering will only apply when this variable is set to non-nil. Could this be merged upstream? Here's the link for the patch: https://github.com/sollidsnake/emacs/commit/aff5c59d10001e1161884ef3d0725eda86fa3ea0 This is my first attempt to contribute to Emacs, and I'm not very familiar neither with C nor with Emacs core, so please let me know if I'm doing something wrong. Jesse Medeiros