aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-01-22 16:37:48 -0500
committerJesús <heckyel@hyperbola.info>2019-01-22 16:37:48 -0500
commit09b8e739e4c7c2edb15ba87022121ec1f7ac5397 (patch)
tree458ddffeb1b3deb847153de54290ec8fcacbff6c
parentdba2382dcf88f0eabf49e0e78586eb5909099289 (diff)
downloademacs-personal-09b8e739e4c7c2edb15ba87022121ec1f7ac5397.tar.lz
emacs-personal-09b8e739e4c7c2edb15ba87022121ec1f7ac5397.tar.xz
emacs-personal-09b8e739e4c7c2edb15ba87022121ec1f7ac5397.zip
fix the function ‘ecb-deactivate’ might not be defined at runtime.
FS #2
-rw-r--r--modules/init-ecb.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/init-ecb.el b/modules/init-ecb.el
index 865b206..83e0167 100644
--- a/modules/init-ecb.el
+++ b/modules/init-ecb.el
@@ -13,10 +13,15 @@
(setq ecb-examples-bufferinfo-buffer-name nil)
(defun ecb-toggle ()
+ "Toogle ECB."
(interactive)
- (if ecb-minor-mode
- (ecb-deactivate)
- (ecb-activate)))
+ (eval-when-compile (require 'ecb nil t))
+ (when (and (require 'ecb nil t)
+ (fboundp 'ecb-deactivate))
+ (if ecb-minor-mode
+ (ecb-deactivate)
+ (ecb-activate))))
+
(global-set-key [f2] 'ecb-toggle)
)