diff options
author | Mark McLoughlin <mark@skynet.ie> | 2004-04-19 06:04:36 +0000 |
---|---|---|
committer | Mark McLoughlin <mark@skynet.ie> | 2004-04-19 06:04:36 +0000 |
commit | d819beb1eaa1ea56c8b4e4b356fce939dbb059ae (patch) | |
tree | 4fc026ac0e2085f99653b5a26c4516dea733f237 /misc | |
parent | 2c3507439353c540bf6c97ef44b9d450cab4dfe2 (diff) | |
download | desktop-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')
-rw-r--r-- | misc/.cvsignore | 1 | ||||
-rw-r--r-- | misc/desktop-entry-mode.el | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/misc/.cvsignore b/misc/.cvsignore index 3dda729..065e2d6 100644 --- a/misc/.cvsignore +++ b/misc/.cvsignore @@ -1,2 +1,3 @@ Makefile.in Makefile +desktop-entry-mode.elc 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 () |