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

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

bug#42703: Ansible inventory mode covers too many files


From: Juri Linkov
Subject: bug#42703: Ansible inventory mode covers too many files
Date: Tue, 04 Aug 2020 02:56:47 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

Visiting a file with the word "inventory" in its name,
for example, "dynamic_inventory.html" or "inventory.jpg"
enables 'ansible-inventory-generic-mode' instead of
using html-mode or image-mode according to file extensions.

This is because the scope of ansible-inventory-generic-mode
is too wide: it matches the subword "inventory" in the file name.
This patch should restrict it:

diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index cd24f497c9..48ac123205 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -643,7 +643,7 @@ ansible-inventory-generic-mode
     ("\\([^ =\n\r]+\\)=\\([^ \n\r]*\\)"
      (1 font-lock-variable-name-face)
      (2 font-lock-keyword-face)))
-  '("inventory")
+  '("inventory\\'")
   (list
    (function
     (lambda ()





reply via email to

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