emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 82/117: Remove ergoemacs-mode from custom set vars


From: Matthew Fidler
Subject: [elpa] 82/117: Remove ergoemacs-mode from custom set vars
Date: Fri, 25 Jul 2014 13:24:26 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit a2d8ea063166f0860b941dba28ff298688daa27d
Author: Matthew L. Fidler <address@hidden>
Date:   Mon Jul 21 20:04:10 2014 -0500

    Remove ergoemacs-mode from custom set vars
---
 ergoemacs-mode.el         |   23 +++++++++++++++++++++++
 ergoemacs-theme-engine.el |   26 +++++++++-----------------
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index a3086db..5776c11 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -548,6 +548,8 @@ bindings the keymap is:
           ergoemacs-modal-save             nil)
     (set-default 'ergoemacs-modal nil)
     (ergoemacs-theme-remove)
+    ;; (customize-save-variable 'ergoemacs-mode nil)
+    ;; (customize-save-variable 'ergoemacs-ini-mode nil)
     (when (featurep 'ergoemacs-menus)
       (ergoemacs-menus-off))
     (when (and ergoemacs-use-mac-command-as-meta (eq system-type 'darwin))
@@ -586,6 +588,27 @@ bindings the keymap is:
                     minor-mode-map-alist))
   (ergoemacs-debug-flush))
 
+;;;###autoload
+(defun ergoemacs-mode-start ()
+  "Start `ergoemacs-mode' if not already started."
+  (ignore-errors ;; In case it didn't work correctly.
+    (unless ergoemacs-mode
+      (ergoemacs-mode 1))))
+
+(define-minor-mode ergoemacs-ini-mode
+  "Dummy mode to call `ergoemacs-mode' at the very last second if not already 
loaded."
+  nil
+  :global t
+  :group 'ergoemacs-mode
+  (cond
+   (ergoemacs-mode)
+   (ergoemacs-ini-mode
+    (add-hook 'emacs-startup-hook 'ergoemacs-mode-start))
+   ((not ergoemacs-ini-mode)
+    (remove-hook 'emacs-startup-hook 'ergoemacs-mode-start))))
+
+
+
 
 
 (defvar ergoemacs-hook-functions '(delete-selection-pre-hook 
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 73b25b4..a7efba1 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -12,7 +12,7 @@
 ;; Last-Updated: 
 ;;           By: 
 ;;     Update #: 0
-;; URL: 
+;; URL:
 ;; Doc URL: 
 ;; Keywords:
 ;; Compatibility: 
@@ -1540,8 +1540,8 @@ FULL-SHORTCUT-MAP-P "
                     ;; (setq n-map (list (make-sparse-keymap 
"ergoemacs-modified") n-map))
                     ))
                   (push map n-map)
-                  (setq n-map (copy-keymap (make-composed-keymap n-map o-map) 
;; (ergoemacs-flatten-composed-keymap (make-composed-keymap n-map o-map))
-                                           ))
+                  (setq n-map (copy-keymap (make-composed-keymap n-map o-map) 
;; (ergoemacs-flatten-composed-keymap (make-composed-keymap n-map o-map))
+                                           ))
                   (set map-name n-map)))
                (t ;; Maps that are not modified.
                 (unless remove-p
@@ -1573,8 +1573,8 @@ The actual keymap changes are included in 
`ergoemacs-emulation-mode-map-alist'."
             (unless (eq defer '())
               (push (cons i defer) ergoemacs-deferred-keys))
             (setq i (+ i 1))
-            (push (cons emulation-var (ergoemacs-get-fixed-map--composite 
tmp);; (ergoemacs-flatten-composed-keymap (ergoemacs-get-fixed-map--composite 
tmp))
-                        )
+            (push (cons emulation-var (ergoemacs-get-fixed-map--composite 
tmp);; (ergoemacs-flatten-composed-keymap (ergoemacs-get-fixed-map--composite 
tmp))
+                        )
                   hook-map-list))))
       
       ;; Reset shortcut hash
@@ -1618,9 +1618,9 @@ The actual keymap changes are included in 
`ergoemacs-emulation-mode-map-alist'."
             (setq final-map (cdr final-map))
           (setq final-map (list final-map)))
         (push menu-keymap final-map)
-        (setq final-map (make-composed-keymap final-map))
-        ;; Currently broken takes out menu :( at the very least
-        ;;(setq final-map (ergoemacs-flatten-composed-keymap  final-map))
+        (setq final-map (make-composed-keymap final-map))
+        ;; Currently broken takes out menu :( at the very least
+        ;;(setq final-map (ergoemacs-flatten-composed-keymap  final-map))
         ;; Rebuild Shortcut hash
         (let (tmp)
           (dolist (c (reverse shortcut-list))
@@ -2506,15 +2506,7 @@ If OFF is non-nil, turn off the options instead."
      menu-item "Save Settings for Future Sessions"
      (lambda ()
        (interactive)
-       (customize-save-variable 'ergoemacs-smart-paste ergoemacs-smart-paste)
-       (customize-save-variable 'ergoemacs-use-menus ergoemacs-use-menus)
-       (customize-save-variable 'ergoemacs-theme (or ergoemacs-theme 
"standard"))
-       (customize-save-variable 'ergoemacs-keyboard-layout 
ergoemacs-keyboard-layout)
-       (customize-save-variable 'ergoemacs-ctl-c-or-ctl-x-delay 
ergoemacs-ctl-c-or-ctl-x-delay)
-       (customize-save-variable 'ergoemacs-handle-ctl-c-or-ctl-x 
ergoemacs-handle-ctl-c-or-ctl-x)
-       (customize-save-variable 'ergoemacs-use-menus ergoemacs-use-menus)
-       (customize-save-variable 'ergoemacs-theme-options 
ergoemacs-theme-options)
-       (customize-save-customized)))
+       (ergoemacs-save-options-to-customized)))
     (ergoemacs-customize
      menu-item "Customize ErgoEmacs"
      (lambda ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]