From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filippo Argiolas Newsgroups: gmane.emacs.help Subject: Re: advice after fontify region with c-mode Date: Fri, 15 Sep 2023 05:43:39 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10891"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 15 05:44:37 2023 Return-path: Envelope-to: geh-help-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 1qgzkz-0002fa-05 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 05:44:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgzkM-00022v-Nh; Thu, 14 Sep 2023 23:43:58 -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 1qgzkJ-00022m-NK for help-gnu-emacs@gnu.org; Thu, 14 Sep 2023 23:43:55 -0400 Original-Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgzkI-00050i-9H for help-gnu-emacs@gnu.org; Thu, 14 Sep 2023 23:43:55 -0400 Original-Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-273fa877befso1251190a91.2 for ; Thu, 14 Sep 2023 20:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694749432; x=1695354232; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WAIR4gVhPMbUz7ENrJoFTy/UepjEMww/AVw3nU4D+ME=; b=ZO/SXfh26UHUjPbCFe2lX7JR8I/YPJgTApgsl9EpIMna6zD8Q1cK/V/jQ6yyj5LFQ5 WexSXnSN7ZQ12V52zkPclKv+oBQ7eeAAHtnm0DnzX+OxJkqU4R7CsRvPw4BTAqGJ0q+x cMpH3GXqmPvaYQ7RXROKMCjL3axk0Wd0p7/jaOZn7uqodKrDAsHE2O6U1haRIV8cGNpn 4idSLhn96OGe4ucOS9FtnMmIaqBtno/a9J4qBRAQ4oCcr8NLV01HC6vpYM8mPqIvV7eN SRkKJxPgWqrxrdO7YLNXRMqQP3aTlXNwYvuXRqmcPegHaEU3mdwUuD6XXtRqFvfbCLNI SegA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694749432; x=1695354232; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WAIR4gVhPMbUz7ENrJoFTy/UepjEMww/AVw3nU4D+ME=; b=qw/sF1Y4Pd8zOArPRWnQWA3KJT0u0ree0JBpCtCQ7xkEkqvcv4BiEtNvvrqWajiqyO FLIiTS/j3b7sW8x8y5EHKuWz+3/ZwfSyJdhbEwza4qvVfBwBxvygw4VokiTquB4bvB/F gxBvX5FENOkjcaWGa7cK2VvVrROQwcANg1/Hc/zkq9Nt36mm15ew4ePFib4XEVPpBGmz K2MMDG3K5EZYbG2w5ikXApRi/Sa2qqhSbnCOMPYQBA735qrExhm4H1VP64aWgol01VX9 B+AeinaEpeNuiuZRHPXcwbXMK1k9DYEnj9Odi4WiSkClNkmYfF2iB31kpgwTiI48+rlR PGmg== X-Gm-Message-State: AOJu0Yx2znwgYkNO9pi8MvvHBY3+SoFoS512F/L96GoLZiSjK6yyway2 NymYnWpblr913qzzgZqBz50qM5IfcUYAlqGhbwxEqxRoIYU= X-Google-Smtp-Source: AGHT+IGzjDmhjA40xGsbW7hIhUNsxlGFokGTx6HN6H3wZd/uPaGh28HTXQ4gclBQSS9x448U8eNMI3tEI27VGD2T6W4= X-Received: by 2002:a17:90a:31c9:b0:25e:d727:6fb4 with SMTP id j9-20020a17090a31c900b0025ed7276fb4mr364055pjf.2.1694749431714; Thu, 14 Sep 2023 20:43:51 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=filippo.argiolas@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145129 Archived-At: On Thu, Sep 14, 2023 at 10:30=E2=80=AFPM Filippo Argiolas wrote: > At the moment I'm doing something like this: > (add-function :after (local 'font-lock-fontify-region-function) > #'my-fontify-region-function)) Apparently using local here ends up calling my function after c-fontify-region-function while I want it to be called after default fontify region. This: (add-function :after (default-value 'font-lock-fontify-region-func= tion) #'clangd-inactive-regions--fontify)) Seems to do the trick and my function gets properly chained to the major mode one with the new extended region. Still open to feedback and suggestions if anyone wants to chime in! Filippo