[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf-mode fontification
From: |
Björn Bidar |
Subject: |
Re: autoconf-mode fontification |
Date: |
Thu, 28 Nov 2024 00:55:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.