]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/ede/srecode.el
Merge from trunk.
[gnu-emacs] / lisp / cedet / ede / srecode.el
index c7c3839c5467fe43f4cf5b40ec880dcb851f2499..ccf9459cae72e189c100312a5ba0b68be806b993 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ede/srecode.el --- EDE utilities on top of SRecoder
 
-;; Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+;; Copyright (C) 2008-2012  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
 
 ;;; Code:
 (defun ede-srecode-setup ()
-  "Update various paths to get SRecode to identify our macros."
-  (let* ((lib (locate-library "ede.el" t))
-        (ededir (file-name-directory lib))
-        (tmpdir (file-name-as-directory
-                 (expand-file-name "templates" ededir))))
-    (when (not tmpdir)
-      (error "Unable to location EDE Templates directory"))
-
-    ;; Rig up the map.
-    (require 'srecode/map)
-    (require 'srecode/find)
-    (add-to-list 'srecode-map-load-path tmpdir)
-    (srecode-map-update-map t)
-
-    ;; We don't call this unless we need it.  Load in the templates.
-    (srecode-load-tables-for-mode 'makefile-mode)
-    (srecode-load-tables-for-mode 'makefile-mode 'ede)
-
-    ;; @todo - autoconf files.
-
-    ))
+  "Initialize Srecode for EDE."
+  (require 'srecode/map)
+  (require 'srecode/find)
+  (srecode-map-update-map t)
+  ;; We don't call this unless we need it.  Load in the templates.
+  (srecode-load-tables-for-mode 'makefile-mode)
+  (srecode-load-tables-for-mode 'makefile-mode 'ede)
+  (srecode-load-tables-for-mode 'autoconf-mode)
+  (srecode-load-tables-for-mode 'autoconf-mode 'ede))
 
 (defmacro ede-srecode-insert-with-dictionary (template &rest forms)
   "Insert TEMPLATE after executing FORMS with a dictionary.