From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: autoconf-mode fontification
Date: Thu, 28 Nov 2024 00:55:24 +0200 [thread overview]
Message-ID: <35330.4238918767$1732748185@news.gmane.org> (raw)
In-Reply-To: <86v7wcihvv.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 24 Nov 2024 20:52:36 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>> Date: Sun, 24 Nov 2024 19:42:21 +0200
>>
>>
>> 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-generic-mode) ("/etc/modules\\.conf" . etc-modules-conf-generic-mode) ("/etc/resolve?\\.conf\\'" . resolve-conf-generic-mode) ("/etc/named\\.boot\\'" . named-boot-generic-mode) ("/etc/sudoers\\'" . etc-sudoers-generic-mode) ("/etc/[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) ("alias\\'" . alias-generic-mode) ("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'" . java-manifest-generic-mode) ("\\.wrl\\'" . vrml-generic-mode) ("prototype\\'" . prototype-generic-mode) ("\\.rules\\'" . mailagent-rules-generic-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-resource-generic-mode) ("\\.Xdefaults\\'" . x-resource-generic-mode) ("\\.fvwm2rc\\'" . fvwm-generic-mode) ("\\.fvwmrc\\'" . fvwm-generic-mode) ("smb\\.conf\\'" . samba-generic-mode) ("access_log\\'" . apache-log-generic-mode) ("access\\.conf\\'" . apache-conf-generic-mode) ("httpd\\.conf\\'" . apache-conf-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-mode) ("\\/\\.ssh/config\\'" . ssh-config-mode) ("Cargo.lock\\'" . toml-mode) ("\\.\\(service\\|timer\\)\\'" . systemd-mode) ("\\.yml\\'" . yaml-mode) ("\\.yaml\\'" . yaml-mode) ("\\.inc\\'" . rpm-spec-mode) ("\\.spec\\'" . rpm-spec-mode) ("/PKGBUILD$" . pkgbuild-mode) ("/etc/nginx/.*\\.conf\\'" . nginx-mode) ("\\.nginx\\'" . nginx-mode) ("\\.plantuml\\'" . plantuml-mode) ("\\.\\(ex\\([s]\\)\\|elixir\\)\\'" . elixir-mode) ("\\.tmpl?\\'" . web-mode) ("\\.html?\\'" . web-mode) ...) nil nil)
* #<subr set-auto-mode>()
* so-long--set-auto-mode(#<subr set-auto-mode>)
* apply(so-long--set-auto-mode #<subr set-auto-mode> nil)
* set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer scratchbox2/configure.ac> "~/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil "~/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" (262001439 56))
#<subr find-file-noselect>("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)
ad-Advice-find-file-noselect(#<subr find-file-noselect> "/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)
apply(ad-Advice-find-file-noselect #<subr find-file-noselect> ("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil))
#f(advice ad-Advice-find-file-noselect :around #<subr find-file-noselect>)("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)
apply(#f(advice ad-Advice-find-file-noselect :around #<subr find-file-noselect>) "/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" (nil nil nil))
editorconfig--advice-find-file-noselect(#f(advice ad-Advice-find-file-noselect :around #<subr find-file-noselect>) "/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.ac" nil nil nil)
apply(editorconfig--advice-find-file-noselect #f(advice ad-Advice-find-file-noselect :around #<subr find-file-noselect>) ("/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/scratchbox2/configure.ac" nil nil nil)
find-file("/home/bidar/dev/sailfish/jolla/pkgs/pj_oss/scratchbox2/configure.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:
* #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_136>(t font-lock-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:
* #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_136> (t font-lock-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.
next prev parent reply other threads:[~2024-11-27 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87iksc7cle.fsf@>
2024-11-24 17:59 ` autoconf-mode fontification Arsen Arsenović
2024-11-24 18:52 ` Eli Zaretskii
2024-11-27 22:55 ` Björn Bidar [this message]
[not found] ` <874j3s70df.fsf@>
2024-11-27 23:33 ` Björn Bidar
[not found] ` <87y1145k1c.fsf@>
2024-11-28 7:32 ` Eli Zaretskii
2024-11-28 9:42 ` Björn Bidar
2024-11-28 11:54 ` Eli Zaretskii
2024-11-24 17:42 Björn Bidar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='35330.4238918767$1732748185@news.gmane.org' \
--to=bjorn.bidar@thaodan.de \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).