]> git.eshelyaron.com Git - emacs.git/commitdiff
ffap.el: Exclude angle brackets from file names in XML
authorStrawberryTea <look@strawberrytea.xyz>
Sat, 9 Mar 2024 21:37:44 +0000 (15:37 -0600)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Mar 2024 09:04:13 +0000 (10:04 +0100)
* lisp/ffap.el (ffap-string-at-point-mode-alist): Add elements for
XML, to better recognize file names in XML buffers.

Copyright-paperwork-exempt: yes
(cherry picked from commit fd0a6cb172dbae8779dae768fa8c475eb0af50ee)

lisp/ffap.el

index 5383f743878c59a1876bd83fc96fd14beac5ca8e..b2b681b7c448161b5ff9bb1e09ee0b45c21c90b0 100644 (file)
@@ -1065,6 +1065,9 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered."
     ;; (La)TeX: don't allow braces
     (latex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
     (tex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
+    ;; XML: don't allow angle brackets
+    (xml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")
+    (nxml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")
     )
   "Alist of (MODE CHARS BEG END), where MODE is a symbol.
 This is possibly a major-mode name, or one of the symbols