unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42703: Ansible inventory mode covers too many files
@ 2020-08-03 23:56 Juri Linkov
  0 siblings, 0 replies; only message in thread
From: Juri Linkov @ 2020-08-03 23:56 UTC (permalink / raw)
  To: 42703

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 ()





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-03 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 23:56 bug#42703: Ansible inventory mode covers too many files Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).