summaryrefslogtreecommitdiff
path: root/misc/desktop-entry-mode.el
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2004-04-19 06:04:36 +0000
committerMark McLoughlin <mark@skynet.ie>2004-04-19 06:04:36 +0000
commitd819beb1eaa1ea56c8b4e4b356fce939dbb059ae (patch)
tree4fc026ac0e2085f99653b5a26c4516dea733f237 /misc/desktop-entry-mode.el
parent2c3507439353c540bf6c97ef44b9d450cab4dfe2 (diff)
downloaddesktop-file-utils-d819beb1eaa1ea56c8b4e4b356fce939dbb059ae.tar.gz
Patch from Ville Skyttä <ville.skytta@iki.fi>
2004-04-19 Mark McLoughlin <mark@skynet.ie> Patch from Ville Skyttä <ville.skytta@iki.fi> * misc/desktop-entry-mode.el: make it work a bit better with GNU emacs.
Diffstat (limited to 'misc/desktop-entry-mode.el')
-rw-r--r--misc/desktop-entry-mode.el20
1 files changed, 19 insertions, 1 deletions
diff --git a/misc/desktop-entry-mode.el b/misc/desktop-entry-mode.el
index 352a9bc..d2cb343 100644
--- a/misc/desktop-entry-mode.el
+++ b/misc/desktop-entry-mode.el
@@ -27,6 +27,21 @@
;; This mode provides basic functionality, eg. syntax highlighting and
;; validation for freedesktop.org desktop entry files.
;;
+;; To install it:
+;;
+;; In XEmacs:
+;; Just install the XEmacs `text-modes' package, this mode is included.
+;; See <http://www.xemacs.org/Documentation/packageGuide.html>.
+;;
+;; In GNU Emacs:
+;; Place this file in your load path somewhere (eg. site-lisp), and add
+;; the following to your .emacs:
+;;
+;; (autoload 'desktop-entry-mode "desktop-entry-mode" "Desktop Entry mode" t)
+;; (add-to-list 'auto-mode-alist
+;; '("\\.desktop\\(\\.in\\)?$" . desktop-entry-mode))
+;; (add-hook 'desktop-entry-mode-hook 'turn-on-font-lock)
+;;
;; For more information about desktop entry files, see
;; <http://www.freedesktop.org/Standards/desktop-entry-spec>
;;
@@ -34,7 +49,7 @@
;;; Code:
-(defconst desktop-entry-mode-version "0.93 (spec 0.9.4)"
+(defconst desktop-entry-mode-version "0.94 (spec 0.9.4)"
"Version of `desktop-entry-mode'.")
(defgroup desktop-entry nil
@@ -164,6 +179,9 @@ Turning on desktop entry mode calls the value of the variable
(setq major-mode 'desktop-entry-mode mode-name "Desktop Entry")
(set (make-local-variable 'imenu-generic-expression)
desktop-entry-imenu-generic-expression)
+ (unless (featurep 'xemacs) ;; font-lock support for GNU Emacs
+ (set (make-local-variable 'font-lock-defaults)
+ '(desktop-entry-font-lock-keywords)))
(run-hooks 'desktop-entry-mode-hook))
(defun desktop-entry-validate ()