bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37133: 27.0.50; use Autoconf mode instead of m4 for acinclude.m4, ac


From: Lars Ingebrigtsen
Subject: bug#37133: 27.0.50; use Autoconf mode instead of m4 for acinclude.m4, aclocal.m4 and acsite.m4
Date: Fri, 23 Aug 2019 05:40:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Vincent Lefevre <address@hidden> writes:

> By default, the m4 mode is used for the acinclude.m4, aclocal.m4 and
> acsite.m4 files. It would be better to use the more specific Autoconf
> mode for these files (like configure.ac).

I don't know these modes well, but the doc string for `autoconf-mode'
says:

---
Major mode for editing Autoconf configure.ac files.
---

So would using it for these other .m4 files be appropriate?  If it is,
the following patch would fix the problem.

diff --git a/lisp/files.el b/lisp/files.el
index f76635017d..2a84c2c48f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2719,6 +2719,8 @@ auto-mode-alist
      ("\\.bib\\'" . bibtex-mode)
      ("\\.bst\\'" . bibtex-style-mode)
      ("\\.sql\\'" . sql-mode)
+     ;; These .m4 files are Autoconf files.
+     ("\\(acinclude\\|aclocal\\|acsite\\)\\.m4\\'" . autoconf-mode)
      ("\\.m[4c]\\'" . m4-mode)
      ("\\.mf\\'" . metafont-mode)
      ("\\.mp\\'" . metapost-mode)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]