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

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

[elpa] 14/35: Another attempt to fix Issue #269


From: Matthew Fidler
Subject: [elpa] 14/35: Another attempt to fix Issue #269
Date: Fri, 11 Jul 2014 22:33:24 +0000

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

commit 6ea68e2a2260cf70d99c068e3f3278278c9a955a
Author: Matthew L. Fidler <address@hidden>
Date:   Mon Jul 7 15:15:54 2014 -0500

    Another attempt to fix Issue #269
---
 ergoemacs-extras.el       |   10 +++++-----
 ergoemacs-functions.el    |    2 +-
 ergoemacs-macros.el       |    2 +-
 ergoemacs-mode.el         |    4 ++--
 ergoemacs-theme-engine.el |   16 ++++++++--------
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/ergoemacs-extras.el b/ergoemacs-extras.el
index 9242f95..8f772cb 100644
--- a/ergoemacs-extras.el
+++ b/ergoemacs-extras.el
@@ -335,7 +335,7 @@
     <table id=\"table_keys\"><tr><th>Type</th>><th>Key</th><th>Short 
Desc</th><th>Emacs Function</th></tr>")
          (extra-dir)
          (curr-dir)
-         (saved-theme ergoemacs-theme))
+         (saved-theme (or ergoemacs-theme "standard")))
     (setq extra-dir (expand-file-name "ergoemacs-extras" user-emacs-directory))
     (when (not (file-exists-p extra-dir))
       (make-directory extra-dir t))
@@ -829,7 +829,7 @@ EXTRA is the extra directory used to gerenate the bash 
~/.inputrc
         (push (match-string 1) lst)))
     (setq re (format "^%s$" (regexp-opt lst 't)))
     (with-temp-buffer
-      (let ((old-lay ergoemacs-theme))
+      (let ((old-lay (or ergoemacs-theme "standard")))
         (dolist (z (ergoemacs-get-themes))
           (ergoemacs-set-default 'ergoemacs-theme z)
           (dolist (x (ergoemacs-get-layouts))
@@ -1587,7 +1587,7 @@ IS-PREFIX tell ergoemacs if this is a prefix diagram."
             (replace-match (format
                             ">Layout: %s; Theme %s<"
                             layout
-                            (or ergoemacs-theme "Standard"))))))
+                            (or ergoemacs-theme "standard"))))))
       (when ergoemacs-inkscape
         (message "Converting to png")
         (shell-command (format "%s -z -f \"%s\" -e \"%s\"" ergoemacs-inkscape
@@ -1615,7 +1615,7 @@ IS-PREFIX tell ergoemacs if this is a prefix diagram."
 (defun ergoemacs-curr-svg ()
   "Generates the current ergoemacs layout, unless it already exists."
   (interactive)
-  (let ((var ergoemacs-theme)
+  (let ((var (or ergoemacs-theme "standard"))
         (layout ergoemacs-keyboard-layout)
         (extra "ergo-layouts")
         (dir "")
@@ -1640,7 +1640,7 @@ IS-PREFIX tell ergoemacs if this is a prefix diagram."
   "Generate SVGs for all the defined layouts and themes."
   (interactive)
   (let* ((lay (or layouts (ergoemacs-get-layouts)))
-         (saved-theme ergoemacs-theme))
+         (saved-theme (or ergoemacs-theme "standard")))
     (dolist (x lay)
       (message "Generate SVG for %s" x)
       (condition-case err
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 93bff61..340b286 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -1946,7 +1946,7 @@ If arg is a negative prefix, copy file path only"
   "Generates the current ergoemacs layout, unless it already exists and opens 
it in a browser.
 With a prefix, force regeneration. "
   (interactive "p")
-  (let ((var ergoemacs-theme)
+  (let ((var (or ergoemacs-theme "standard"))
         (layout ergoemacs-keyboard-layout)
         (extra "ergo-layouts")
         (dir "")
diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index 5f99c76..206b10b 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -234,7 +234,7 @@ Uses `ergoemacs-theme-component--parse-keys-and-body' and
     (setq kb (ergoemacs-theme-component--parse-keys-and-body keys-and-body  
nil t)
           plist (nth 0 kb)
           body (nth 1 kb))
-    `(let ((old-ergoemacs-theme ergoemacs-theme)
+    `(let ((old-ergoemacs-theme (or ergoemacs-theme "standard"))
            (old-version (ergoemacs-theme-get-version))
            (macro
             ,(if (plist-get plist ':macro)
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index dcd52b0..d1bc027 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -293,7 +293,7 @@ Valid values are:
                     (if (not (eq 'ergoemacs-mode (nth 0 x)))
                         x
                       `(ergoemacs-mode ,(concat
-                                         (if (not ergoemacs-theme)
+                                         (if (string= "standard" (or 
ergoemacs-theme "standard"))
                                              " ErgoEmacs"
                                            (concat " Ergo"
                                                    (upcase (substring 
ergoemacs-theme 0 1))
@@ -313,7 +313,7 @@ Valid values are:
   "Setups keys based on a particular layout. Based on 
`ergoemacs-keyboard-layout'."
   (interactive)
   (ergoemacs-debug "Ergoemacs layout: %s" ergoemacs-keyboard-layout)
-  (ergoemacs-debug "Ergoemacs theme: %s" ergoemacs-theme)
+  (ergoemacs-debug "Ergoemacs theme: %s" (or ergoemacs-theme "standard"))
   (ergoemacs-debug "Emacs Version: %s" (emacs-version))
   (let ((ergoemacs-state (if (boundp 'ergoemacs-mode) ergoemacs-mode nil))
         (layout
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index b04beae..ed42b69 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -1362,7 +1362,7 @@ The actual keymap changes are included in 
`ergoemacs-emulation-mode-map-alist'."
                   final-unbind-map (ergoemacs-rm-key final-unbind-map key))))
         ;; Add `ergoemacs-mode' menu.
         (define-key menu-keymap [menu-bar ergoemacs-mode]
-          `("ErgoEmacs" . ,(ergoemacs-keymap-menu ergoemacs-theme)))
+          `("ErgoEmacs" . ,(ergoemacs-keymap-menu (or ergoemacs-theme 
"standard"))))
         ;; Coaleasing the keymaps needs to be done after removing the
         ;; keys, otherwise the keys are not removed...  Probably
         ;; playing with pointers in C.
@@ -1908,17 +1908,17 @@ DONT-COLLAPSE doesn't collapse empty keymaps"
     (setq ergoemacs-theme-version
           (mapcar
            (lambda(elt)
-             (if (not (equal ergoemacs-theme (nth 0 elt)))
+             (if (not (equal (or ergoemacs-theme "standard") (nth 0 elt)))
                  elt
                (setq found t)
-               (list ergoemacs-theme version)))
+               (list (or ergoemacs-theme "standard") version)))
            ergoemacs-theme-version))
     (unless found
-      (push (list ergoemacs-theme version) ergoemacs-theme-version))))
+      (push (list (or ergoemacs-theme "standard") version) 
ergoemacs-theme-version))))
 
 (defun ergoemacs-theme-get-version ()
   "Gets the current version for the current theme"
-  (let ((theme-ver (assoc ergoemacs-theme ergoemacs-theme-version)))
+  (let ((theme-ver (assoc (or ergoemacs-theme "standard") 
ergoemacs-theme-version)))
     (if (not theme-ver) nil
       (car (cdr theme-ver)))))
 
@@ -2038,7 +2038,7 @@ If OFF is non-nil, turn off the options instead."
 
 (defun ergoemacs-theme-option-enabled-p (option)
   "Determines if OPTION is enabled."
-  (let ((plist (gethash ergoemacs-theme ergoemacs-theme-hash))
+  (let ((plist (gethash (or ergoemacs-theme "standard") ergoemacs-theme-hash))
         options-on options-off)
     (setq options-on (plist-get plist ':optional-on)
           options-off (plist-get plist ':optional-off))
@@ -2151,7 +2151,7 @@ If OFF is non-nil, turn off the options instead."
            `(,(intern theme) menu-item ,(concat theme " - " (plist-get 
(gethash theme ergoemacs-theme-hash) ':description))
              (lambda() (interactive)
                (ergoemacs-set-default 'ergoemacs-theme ,theme))
-             :button (:radio . (string= ergoemacs-theme ,theme))))
+             :button (:radio . (string= (or ergoemacs-theme "standard") 
,theme))))
          (sort (ergoemacs-get-themes) 'string<))))
     ,(ergoemacs-keymap-menu-theme-options theme)
     ,(ergoemacs-keymap-menu-theme-version theme)
@@ -2236,7 +2236,7 @@ If OFF is non-nil, turn off the options instead."
        (interactive)
        (customize-save-variable 'ergoemacs-smart-paste ergoemacs-smart-paste)
        (customize-save-variable 'ergoemacs-use-menus ergoemacs-use-menus)
-       (customize-save-variable 'ergoemacs-theme ergoemacs-theme)
+       (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)



reply via email to

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