mlf176f2 pushed a commit to branch externals/ergoemacs-mode in repository elpa.
commit 478703cf31a5ebe9db6c4b798e7e525f1c880772 Author: Matthew L. Fidler <[email protected]> Date: Fri Jun 27 09:14:44 2014 -0500 Support smartparens-mode and auto-indent-mode --- ergoemacs-menus.el | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ergoemacs-menus.el b/ergoemacs-menus.el index b4b616e..86b7e5c 100644 --- a/ergoemacs-menus.el +++ b/ergoemacs-menus.el @@ -662,8 +662,19 @@ All other modes are assumed to be minor modes or unimportant. (blink-cursor menu-item "Cursor Blink" blink-cursor-mode :button (:toggle . blink-cursor-mode)) - (electric-pair menu-item "Insert Matching Parentheses/Bracket" electric-pair-mode - :button (:toggle . electric-pair-mode)) + (auto-pair menu-item "Insert Matching Parentheses/Bracket" + (lambda() (interactive) + (cond + ((fboundp 'smartparens-mode) + (smartparens-mode)) + ((fboundp 'autopair-global-mode) + (autopair-global-mode)) + (t (electric-pair-mode)))) + :button (:toggle . + (or + (and (boundp 'smartparens-mode) smartparens-mode) + (and (boundp 'auto-indent-mode) auto-indent-mode) + electric-pair-mode))) (tabbar-mode menu-item "Tabbar" ergoemacs-menu-tabbar-toggle :button (:toggle . (and (boundp 'tabbar-mode)
