Two parts: first, a hairy loop in dot-emacs.el to install interesting-
looking directories into the load-path; second, a conditional
installation of a hairy auto-mode-alist item in emacs.
(concat "(" (buffer-string) ")")))))))
(cdr (assq sym mdw-config)))
+;; --- Set up the load path convincingly ---
+
+(dolist (dir (append (and (boundp 'debian-emacs-flavor)
+ (list (concat "/usr/share/"
+ (symbol-name debian-emacs-flavor)
+ "/site-lisp")))))
+ (dolist (sub (directory-files dir t))
+ (when (and (file-accessible-directory-p sub)
+ (not (member sub load-path)))
+ (setq load-path (nconc load-path (list sub))))))
+
;; --- Is an Emacs library available? ---
(defun library-exists-p (name)
(maybe-autoload 'nc-timesheet-prepare "nc-timesheet" nil t nil)
(maybe-autoload 'nc-timesheet-submit "nc-timesheet" nil t nil)
+(and (library-exists-p "debian-changelog-mode")
+ (add-to-list 'auto-mode-alist
+ `(,(concat "/debian/"
+ "\\("
+ "[" "[:lower:][:digit:]]"
+ "[[:lower:][:digit:].+-" "]+"
+ "\\."
+ "\\)?"
+ "changelog\\'")
+ . debian-changelog-mode)))
+
(and (library-exists-p "vc-git")
(not (memq 'GIT vc-handled-backends))
(setq vc-handled-backends (cons 'GIT vc-handled-backends)))