From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#62675: 29.0.60; emoji-zoom-increase interacts badly with faces Date: Wed, 05 Apr 2023 13:55:22 +0200 Message-ID: <87pm8ih7bp.fsf@gmail.com> References: <87y1n6hj7r.fsf@gmail.com> <83v8iasonk.fsf@gnu.org> <87ttxuhev4.fsf@gmail.com> <83mt3mslgs.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="8867"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62675@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 05 13:56:09 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pk1kH-00023c-Nc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Apr 2023 13:56:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pk1kB-00078s-Tf; Wed, 05 Apr 2023 07:56:03 -0400 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 1pk1kB-00078i-2x for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 07:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk1kA-0002vz-Pw for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 07:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pk1kA-0000S8-EI for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 11:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62675 X-GNU-PR-Package: emacs Original-Received: via spool by 62675-submit@debbugs.gnu.org id=B62675.16806957331692 (code B ref 62675); Wed, 05 Apr 2023 11:56:02 +0000 Original-Received: (at 62675) by debbugs.gnu.org; 5 Apr 2023 11:55:33 +0000 Original-Received: from localhost ([127.0.0.1]:51019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk1jh-0000RD-02 for submit@debbugs.gnu.org; Wed, 05 Apr 2023 07:55:33 -0400 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:45739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk1je-0000Qw-MF for 62675@debbugs.gnu.org; Wed, 05 Apr 2023 07:55:31 -0400 Original-Received: by mail-wm1-f52.google.com with SMTP id v6-20020a05600c470600b003f034269c96so11579118wmo.4 for <62675@debbugs.gnu.org>; Wed, 05 Apr 2023 04:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680695724; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=IAg0B3O/sOD5MFupIAMDA/y/svRC1lbezEJn3RBUAho=; b=VUJ0F4ChNzP/j4Po+hphP6Sf7jfv2BKLggkxJA7G8P3ykcBU8HUh1CmMknnyJWJoio eJisAs1C7j9FQV4lUmyq1jBTH0ThveME5qlmy1rdtD2F6zHdOF4GuOm2mAtyJ6u/eekE tP+BlnQT9xYA37d1VbvIjiUNuZWzEyavfj7oPm6NmCwbH+8Mc0h7a1CWLuMdaUKDjr6J BPd8TZQVcyTOqnZMtQhqSsxlZ5xRbtJtFfY7v2IJfNqk7zYhAM+tFYZAunhxe6i+lBZM 6i6RlP6aFjv8cuZUgGrI5DgY0IP60P6P6UFRN3nHibM4nOLGkHWYcs5FEHIMlfb+Gx+P 3qow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680695724; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IAg0B3O/sOD5MFupIAMDA/y/svRC1lbezEJn3RBUAho=; b=SxpOgkDMeihghl6jbAcLodTWOo8Uga0/FEmgcuaymqDXD7P/euzlS63TEOQTZcd58P zTCyru4WK/NHgq46rW/zFGiY0ba0bpWn1Cjp7sqSH9f6Mp0JqIBr3goA/WhIi0hOyCEB 7sRG4p7hRSSzG8tjsXc5RmmfYa9dryBylqrvpIHsEyzKIUYVM9sCocdlxqEEAOm4JHKp mbXFw8A1aDP2TW0kL/3QmmsFI1BKaf+bxlj7C+4vSuUhHpsk1C6nQqvmJtO6Kh9/oOfK ekl+bl373FkXAQkw4Iyy48HY0a+XLEsMXDr9/H9SRLDtdzEXGE6CPmGU8vUxzU3uechW 7Zpg== X-Gm-Message-State: AAQBX9cTkx0z4QNzcqwotP/Nh4CxkuvhWCpTEiOGIDMFQwg81kt0TDPd AgocQYJ92fuTxKbPaaXt1I2LZrlqtcc= X-Google-Smtp-Source: AKy350awEyFjrXMYwBehHL7Dr0YJvEfqaVmr8Bg7hWN7d12s6v1kZDoVZMoMZKjjRcAwrar6Crx/xA== X-Received: by 2002:a7b:cd0d:0:b0:3eb:42fc:fb30 with SMTP id f13-20020a7bcd0d000000b003eb42fcfb30mr4731750wmj.32.1680695724120; Wed, 05 Apr 2023 04:55:24 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id i16-20020adffc10000000b002c55ec7f661sm14924882wrr.5.2023.04.05.04.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 04:55:23 -0700 (PDT) In-Reply-To: <83mt3mslgs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Apr 2023 12:54:27 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259263 Archived-At: >>>>> On Wed, 05 Apr 2023 12:54:27 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: 62675@debbugs.gnu.org >> Date: Wed, 05 Apr 2023 11:12:31 +0200 >> Eli> Please do, and thanks. We don't need to understand why some bug seems Eli> to work, it is enough to fix the bug. >> >> This seems to work: Eli> Looks reasonable, thanks. Please try both with font-lock-mode ON and Eli> OFF, and in the latter case both with some non-default face at point Eli> and without. Ah yes, font-lock off makes it all more complex. Tested in those 3 cases. Is this too much for emacs-29? diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index bcd4aac4f29..ff55170875e 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -708,22 +708,32 @@ emoji-zoom-increase FACTOR is the multiplication factor for the size." (interactive) (set-transient-map emoji-zoom-map t nil "Zoom with %k") - (let* ((factor (or factor 1.1)) - (old (get-text-property (point) 'face)) - (height (or (and (consp old) - (plist-get old :height)) - 1.0)) - (inhibit-read-only t)) - (with-silent-modifications - (if (consp old) - (add-text-properties - (point) (1+ (point)) - (list 'face (plist-put (copy-sequence old) :height (* height factor)) - 'rear-nonsticky t)) - (add-face-text-property (point) (1+ (point)) - (list :height (* height factor))) - (put-text-property (point) (1+ (point)) - 'rear-nonsticky t))))) + (unless (eobp) + (let* ((factor (or factor 1.1)) + (old (get-text-property (point) 'face)) + ;; The text property is either a named face, or a plist + ;; with :height, or a list starting with such a plist, + ;; followed by one or more faces. + (newheight (* (or (and (consp old) + (or (plist-get (car old) :height) + (plist-get old :height))) + 1.0) + factor)) + (inhibit-read-only t)) + (with-silent-modifications + (if (consp old) + (add-text-properties + (point) (1+ (point)) + (list 'face + (if (eq (car old) :height) + (plist-put old :height newheight) + (cons (plist-put (car old) :height newheight) + (cdr old))) + 'rear-nonsticky t)) + (add-face-text-property (point) (1+ (point)) + (list :height newheight)) + (put-text-property (point) (1+ (point)) + 'rear-nonsticky t)))))) ;;;###autoload (defun emoji-zoom-decrease () Robert --