my-srecode-reload-templates
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 11 Feb 2015 19:09:06 +0200
changeset 1206 4de7a444cf35
parent 1205 40a4c859a994
child 1207 c658f0d30525
my-srecode-reload-templates
.emacs-my
--- a/.emacs-my	Wed Feb 11 19:04:28 2015 +0200
+++ b/.emacs-my	Wed Feb 11 19:09:06 2015 +0200
@@ -2379,12 +2379,19 @@
   (global-ede-mode 1)
 
   (require 'srecode)
-  (unless (boundp 'srecode-map-load-path)
-    (setq srecode-map-load-path nil))
+  (defvar srecode-map-load-path nil)
   (add-to-list 'srecode-map-load-path (locate-user-emacs-file "srecode/"))
   (global-srecode-minor-mode 1)
   (add-hook 'prog-mode-hook 'srecode-minor-mode)
 
+  (defun my-srecode-reload-templates ()
+    "Reload all templates under `srecode-map-load-path'. Useful
+during template developing."
+    (interactive)
+    (setq srecode-mode-table-list nil
+          srecode-current-map nil)
+    (srecode-map-update-map) )
+
   (ignore-errors
     (cedet-ectag-version-check)
     (semantic-load-enable-primary-ectags-support))