From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.help Subject: Re: autoconf-mode fontification Date: Thu, 28 Nov 2024 00:55:24 +0200 Message-ID: <35330.4238918767$1732748185@news.gmane.org> References: <86v7wcihvv.fsf@gnu.org> 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="23208"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 27 23:56:17 2024 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 1tGQxF-0005sb-0f for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 27 Nov 2024 23:56:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGQwd-0005D1-3W; Wed, 27 Nov 2024 17:55:39 -0500 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 1tGQwa-0005Ca-GH for help-gnu-emacs@gnu.org; Wed, 27 Nov 2024 17:55:36 -0500 Original-Received: from thaodan.de ([2a03:4000:4f:f15::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGQwX-0008To-SZ; Wed, 27 Nov 2024 17:55:36 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 32317D00043; Thu, 28 Nov 2024 00:55:26 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1732748126; bh=UWMsm5cRL0xZIbALWtb5JIQRnsiMcfCfgM5jo4qAYuE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=dWlYZk4c5FV4EJwhAqSleb6+uiEQu8NJdDjrLLTEvVbT2Dr8KSJoK5+Rq5DlSfT0W WF8wG+PkBqAFirgZxvul3RXNEkGNHdF+vhfUC/2j4c9/dV3rs4xc5f3DcKgMdj4t0H irBD7mKzvo3DCoI52ehbSD3Y6i+FAtIjK5+pmFTTMEAD763yyw97bsrEmWrBH+JWKw rPt3VDxfJkgLDLyWwwtrD/a7yuS7wpUsxJ9q8ulE2yPvMoT0efSaZTECcVJhwEpqPl iFnCec1KJZbLWWx+YR8q6CLKWGkFhCCLN7w4F35ejezFENEKcq0QypTo4ScpZK6zIO UY1epvLY+5QwuxpETyApM7c9FV8AgkUOltg5Ky6LpWStmDvk6pwb/FXSX1vcHzCLpx 1LSN2bw1BVtVs7RpFnSRR4G4oxnab5TgvTFc2UoGqa0KBj0ZiXyJL59uGFlfBLoviz udRpVp3+U3hO/NunFo9X9/V3jsPPrxdHBlWwmEBk1/S3Y3YXhPUGfYHJu7dQeyLmoX TCqdwYjqCwVU+x0l1vYfFei9hdGDnxrBLq8sYKl5PuVn8IU5zNYzc7d++5XCKBo1i3 pW/Tz90ZQpE6bgIZntzOBiNF9+UGkSvzk8qFHJX7Ku0/uq6lXiR9/bWX3tGsznhW/b koSvWR4AzwfYSnHTexLe6dAs= In-Reply-To: <86v7wcihvv.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 24 Nov 2024 20:52:36 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=2a03:4000:4f:f15::1; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 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, INVALID_MSGID=0.568, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:148420 Archived-At: Eli Zaretskii writes: >> From: Bj=C3=B6rn Bidar >> Date: Sun, 24 Nov 2024 19:42:21 +0200 >>=20 >>=20 >> I noticed that font-lock mode isn't enable by default for autoconf-mode. > > How did you see that? Is that in "emacs -Q"? > > When I visit configure.ac in "emacs -Q", I do see font-lock, and > major-mode is autoconf-mode. So I wonder how it doesn't work for you. Hm that works for me too. However I noticed that once I enter autoconf-mode that font-lock mode is disabled and doesn't turn on again. I tried to step through the debugger once triggered after turn-on-font-lock= -if-desired. After kill-all-local-variables font-lock-mode is never t again in the buffer that's opened with that mode unless I call the mode explicitly. Debugger entered--entering a function: * copy-tree(((face font-lock-face))) * font-lock-default-function(nil) * font-lock-mode(-1) * font-lock-change-mode() * kill-all-local-variables() * autoconf-mode() * set-auto-mode-0(autoconf-mode nil) * set-auto-mode--apply-alist((("/etc/conf\\.modules" . etc-modules-conf-gen= eric-mode) ("/etc/modules\\.conf" . etc-modules-conf-generic-mode) ("/etc/r= esolve?\\.conf\\'" . resolve-conf-generic-mode) ("/etc/named\\.boot\\'" . n= amed-boot-generic-mode) ("/etc/sudoers\\'" . etc-sudoers-generic-mode) ("/e= tc/[v]*fstab\\'" . etc-fstab-generic-mode) ("/etc/shadow-?\\'" . etc-passwd= -generic-mode) ("/etc/group-?\\'" . etc-passwd-generic-mode) ("/etc/passwd-= ?\\'" . etc-passwd-generic-mode) ("/etc/services\\'" . etc-services-generic= -mode) ("/etc/inetd\\.conf\\'" . inetd-conf-generic-mode) ("\\.mailrc\\'" .= mailrc-generic-mode) ("inventory\\'" . ansible-inventory-generic-mode) ("a= lias\\'" . alias-generic-mode) ("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF= ]\\'" . java-manifest-generic-mode) ("\\.wrl\\'" . vrml-generic-mode) ("pro= totype\\'" . prototype-generic-mode) ("\\.rules\\'" . mailagent-rules-gener= ic-mode) ("[hH][oO][sS][tT][sS]\\'" . hosts-generic-mode) ("[xX]modmap\\(rc= \\)?\\'" . xmodmap-generic-mode) ("\\.ad\\'" . x-resource-generic-mode) ("\= \.Xenvironment\\'" . x-resource-generic-mode) ("\\.Xresources\\'" . x-resou= rce-generic-mode) ("\\.Xdefaults\\'" . x-resource-generic-mode) ("\\.fvwm2r= c\\'" . fvwm-generic-mode) ("\\.fvwmrc\\'" . fvwm-generic-mode) ("smb\\.con= f\\'" . samba-generic-mode) ("access_log\\'" . apache-log-generic-mode) ("a= ccess\\.conf\\'" . apache-conf-generic-mode) ("httpd\\.conf\\'" . apache-co= nf-generic-mode) ("srm\\.conf\\'" . apache-conf-generic-mode) ("\\.epub\\'"= . nov-mode) ("\\.po\\'" . po-mode) ("\\.\\(org\\|org_archive\\)\\'" . org-= mode) ("\\.jira\\'" . jira-markup-mode) ("\\.confluence\\'" . jira-markup-m= ode) ("\\/\\.ssh/config\\'" . ssh-config-mode) ("Cargo.lock\\'" . toml-mode= ) ("\\.\\(service\\|timer\\)\\'" . systemd-mode) ("\\.yml\\'" . yaml-mode) = ("\\.yaml\\'" . yaml-mode) ("\\.inc\\'" . rpm-spec-mode) ("\\.spec\\'" . rp= m-spec-mode) ("/PKGBUILD$" . pkgbuild-mode) ("/etc/nginx/.*\\.conf\\'" . ng= inx-mode) ("\\.nginx\\'" . nginx-mode) ("\\.plantuml\\'" . plantuml-mode) (= "\\.\\(ex\\([s]\\)\\|elixir\\)\\'" . elixir-mode) ("\\.tmpl?\\'" . web-mode= ) ("\\.html?\\'" . web-mode) ...) nil nil) * #() * so-long--set-auto-mode(#) * apply(so-long--set-auto-mode # nil) * set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "~/dev/sailfish/j= olla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil "~/dev/sailfish/jolla/pk= gs/pj_oss/scratchbox2/configure.ac" (262001439 56)) #("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/sc= ratchbox2/configure.ac" nil nil nil) ad-Advice-find-file-noselect(# "/home/bidar/dev/= sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil) apply(ad-Advice-find-file-noselect # ("/home/bid= ar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)) #f(advice ad-Advice-find-file-noselect :around #= )("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil= nil nil) apply(#f(advice ad-Advice-find-file-noselect :around #) "/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.a= c" (nil nil nil)) editorconfig--advice-find-file-noselect(#f(advice ad-Advice-find-file-nos= elect :around #) "/home/bidar/dev/sailfish/jolla/p= kgs/pj_oss/scratchbox2/configure.ac" nil nil nil) apply(editorconfig--advice-find-file-noselect #f(advice ad-Advice-find-fi= le-noselect :around #) ("/home/bidar/dev/sailfish/= jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)) find-file-noselect("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox= 2/configure.ac" nil nil nil) find-file("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configu= re.ac") dirvish-find-entry-a() apply(dirvish-find-entry-a nil) dired-find-file() dired-open-file(nil) funcall-interactively(dired-open-file nil) command-execute(dired-open-file) While further stepping through with debug-on-variable-change font-lock-mode with emacs -Q and my currently used Emacs. I noticed that at some point this happens with emacs -Q: * #(t font-loc= k-mode nil (:debug-on-exit t)) * backtrace-frame(1 called-interactively-p) * called-interactively-p(any) * font-lock-mode() * turn-on-font-lock() * turn-on-font-lock-if-desired() * global-font-lock-mode-enable-in-buffer() * run-hooks(after-change-major-mode-hook) While for me this also happens except that the anonymous lambda function is: * # (t font-l= ock-mode (-1) (:debug-on-exit t)) How could that be? >> I also noticed that the fontification is rather limited. > > Feel free to submit a feature-request bug report with improvements in > font-lock. I was talking about the font-lock in that mode, I hope that was clear.