diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-08-27 22:22:29 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-08-27 22:40:52 -0400 |
commit | 043a84702f3002d711784e5fe97c9ea8690b4cfa (patch) | |
tree | 56fb30aa4fe9d1eed4c9e8af5f159a8e81718cac /lisp/files.el | |
parent | 9e79a31c09d673019be2a2c78bf8b7db89351819 (diff) | |
download | emacs-043a84702f3002d711784e5fe97c9ea8690b4cfa.tar.gz |
Font-lock FDO desktop files correctly
Single and double quotes do not have a special meaning in
desktop files.
https://standards.freedesktop.org/desktop-entry-spec/latest/
* etc/NEWS: Mention new mode.
* lisp/files.el (auto-mode-alist): Split out an entry for handling
the .desktop extension with conf-desktop-mode.
* lisp/textmodes/conf-mode.el (conf-desktop-font-lock-keywords): New
variable with rules for booleans and format specifiers.
(conf-unix-mode): Remove desktop file entry example from docstring.
(conf-desktop-mode): New derived major mode.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 872fc46e87a..b3eab29c53a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2611,11 +2611,12 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\)\\'" . archive-mo ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) ;; Windows candidates may be opened case sensitively on Unix ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) - ("\\.\\(?:desktop\\|la\\)\\'" . conf-unix-mode) + ("\\.la\\'" . conf-unix-mode) ("\\.ppd\\'" . conf-ppd-mode) ("java.+\\.conf\\'" . conf-javaprop-mode) ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) ("\\.toml\\'" . conf-toml-mode) + ("\\.desktop\\'" . conf-desktop-mode) ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode) ;; ChangeLog.old etc. Other change-log-mode entries are above; |