paul@0 | 1 | ;; -*-emacs-lisp-*- |
paul@0 | 2 | ;; |
paul@0 | 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50libcalendaring.el |
paul@0 | 4 | ;; for the Debian libcalendaring package |
paul@0 | 5 | ;; |
paul@0 | 6 | ;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at> |
paul@0 | 7 | ;; Modified by Dirk Eddelbuettel <edd@debian.org> |
paul@0 | 8 | ;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org> |
paul@0 | 9 | |
paul@0 | 10 | ;; The libcalendaring package follows the Debian/GNU Linux 'emacsen' policy and |
paul@0 | 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, |
paul@0 | 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then |
paul@0 | 13 | ;; installed in a subdirectory of the respective site-lisp directory. |
paul@0 | 14 | ;; We have to add this to the load-path: |
paul@0 | 15 | (let ((package-dir (concat "/usr/share/" |
paul@0 | 16 | (symbol-name debian-emacs-flavor) |
paul@0 | 17 | "/site-lisp/libcalendaring"))) |
paul@0 | 18 | ;; If package-dir does not exist, the libcalendaring package must have |
paul@0 | 19 | ;; removed but not purged, and we should skip the setup. |
paul@0 | 20 | (when (file-directory-p package-dir) |
paul@0 | 21 | (if (fboundp 'debian-pkg-add-load-path-item) |
paul@0 | 22 | (debian-pkg-add-load-path-item package-dir) |
paul@0 | 23 | (setq load-path (cons package-dir load-path))) |
paul@0 | 24 | (autoload 'libcalendaring-mode "libcalendaring-mode" |
paul@0 | 25 | "Major mode for editing libcalendaring files." t) |
paul@0 | 26 | (add-to-list 'auto-mode-alist '("\\.libcalendaring$" . libcalendaring-mode)))) |