[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 46/117: Install ergoemacs-read-default for every major mode
From: |
Matthew Fidler |
Subject: |
[elpa] 46/117: Install ergoemacs-read-default for every major mode |
Date: |
Fri, 25 Jul 2014 13:24:08 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 320ce8bac71e382878394bf2c170bb9996698699
Author: Matthew L. Fidler <address@hidden>
Date: Wed Jul 16 22:39:13 2014 -0500
Install ergoemacs-read-default for every major mode
---
ergoemacs-advices.el | 16 +++++++++++++---
ergoemacs-functions.el | 6 +++---
ergoemacs-mode.el | 8 ++++++++
ergoemacs-theme-engine.el | 1 +
ergoemacs-themes.el | 7 +++++--
ergoemacs-translate.el | 1 +
6 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/ergoemacs-advices.el b/ergoemacs-advices.el
index 28e066d..8d1397d 100644
--- a/ergoemacs-advices.el
+++ b/ergoemacs-advices.el
@@ -61,7 +61,6 @@ If `pre-command-hook' is used and `ergoemacs-mode' is remove
from `ergoemacs-pre
(remove-hook 'ergoemacs-pre-command-hook function local))
(t
ad-do-it)))
-
(defadvice describe-buffer-bindings (around ergoemacs-describe-buffer-bindings
activate)
"Describes buffer bindings without `ergoemacs-read-input-keys' enabled"
(let (ergoemacs-read-input-keys
@@ -73,8 +72,19 @@ If `pre-command-hook' is used and `ergoemacs-mode' is remove
from `ergoemacs-pre
"This does the right thing when modifying `ergoemacs-keymap'.
Also adds keymap-flag for user-defined keys run with `run-mode-hooks'."
(let ((is-global-p (equal keymap (current-global-map)))
- (is-local-p (equal keymap (current-local-map))))
- (if (and (or is-local-p ergoemacs-run-mode-hooks)
+ (is-local-p (equal keymap (current-local-map)))
+ ergoemacs-local-map)
+ (when (and is-local-p (not ergoemacs-local-emulation-mode-map-alist))
+ (set (make-local-variable 'ergoemacs-local-emulation-mode-map-alist)
'()))
+ ;; (when is-local-p
+ ;; (setq ergoemacs-local-map
+ ;; (cdr (car ergoemacs-local-emulation-mode-map-alist)))
+ ;; (unless (ignore-errors (keymapp ergoemacs-local-map))
+ ;; (setq ergoemacs-local-map (make-sparse-keymap)))
+ ;; (define-key ergoemacs-local-map key def)
+ ;; (setq ergoemacs-local-emulation-mode-map-alist
+ ;; (list (cons 'ergoemacs-mode (make-sparse-keymap)))))
+ (if (and ergoemacs-run-mode-hooks
(not (equal keymap (current-global-map)))
(not (equal keymap ergoemacs-keymap)))
(let ((ergoemacs-run-mode-hooks nil)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index c59ca16..559d35e 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -2138,7 +2138,7 @@ Guillemet -> quote, degree -> @, s-zed -> ss, upside-down
?! -> ?!."
(w32-long-file-name (abbreviate-file-name default-directory))
;; Fix case issues
(abbreviate-file-name default-directory)) "*"))))
-(add-hook 'dirtrack-directory-change-hook
'ergoemacs-shell-here-directory-change-hook)
+;; (add-hook 'dirtrack-directory-change-hook
'ergoemacs-shell-here-directory-change-hook)
(defvar dirtrack-list)
(declare-function shell-dirtrack-mode "shell.el")
@@ -2165,7 +2165,7 @@ Sends shell prompt string to process, then turns on
(shell-dirtrack-mode -1)
(dirtrack-mode 1))))))
-(add-hook 'shell-mode-hook 'ergoemacs-shell-here-hook)
+;; (add-hook 'shell-mode-hook 'ergoemacs-shell-here-hook)
(defun ergoemacs-shell-here (&optional shell-program buffer-prefix)
"Runs/switches to a shell process in the current directory."
@@ -2178,7 +2178,7 @@ Sends shell prompt string to process, then turns on
(set-buffer (get-buffer-create name))
(funcall shell name)))
-(add-hook 'eshell-post-command-hook
'ergoemacs-shell-here-directory-change-hook)
+;; (add-hook 'eshell-post-command-hook
'ergoemacs-shell-here-directory-change-hook)
(defvar eshell-buffer-name)
(defun ergoemacs-eshell-here ()
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index ba29d58..bd504c9 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -364,6 +364,12 @@ Valid values are:
(defvar ergoemacs-read-emulation-mode-map-alist nil
"Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
+(defvar ergoemacs-read-local-emulation-mode-map-alist nil
+ "Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
+
+(defvar ergoemacs-local-emulation-mode-map-alist nil
+ "Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
+
(defvar ergoemacs-emulation-mode-map-alist nil
"Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
@@ -378,6 +384,8 @@ Valid values are:
When REMOVE is true, remove the emulations."
(dolist (hook (reverse '(ergoemacs-modal-emulation-mode-map-alist
ergoemacs-read-emulation-mode-map-alist
+ ergoemacs-read-local-emulation-mode-map-alist
+ ergoemacs-local-emulation-mode-map-alist
ergoemacs-repeat-emulation-mode-map-alist
ergoemacs-emulation-mode-map-alist
ergoemacs-shortcut-emulation-mode-map-alist
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 8d8463c..4252776 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -1407,6 +1407,7 @@ The actual keymap changes are included in
`ergoemacs-emulation-mode-map-alist'."
ergoemacs-unbind-keys (not remove-p)
ergoemacs-read-input-keymap final-read-map
ergoemacs-read-emulation-mode-map-alist
`((ergoemacs-read-input-keys ,@final-read-map))
+ ergoemacs-read-emulation-mode-map-alist nil
ergoemacs-shortcut-keymap final-shortcut-map
ergoemacs-no-shortcut-keymap final-no-shortcut-map
ergoemacs-unbind-keymap final-unbind-map
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 7104d4d..00bb07b 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -145,9 +145,12 @@
;; (browse-url
"http://www.gnu.org/software/emacs/tour/"))
;; "Browse http://www.gnu.org/software/emacs/tour/")
;; "\tSee an overview of Emacs features at gnu.org"
- ))
- )
+ )))
+ (add-hook 'dirtrack-directory-change-hook
'ergoemacs-shell-here-directory-change-hook)
(add-hook 'kill-buffer-hook 'ergoemacs-save-buffer-to-recently-closed)
+ (add-hook 'shell-mode-hook 'ergoemacs-shell-here-hook)
+ (add-hook 'eshell-post-command-hook
'ergoemacs-shell-here-directory-change-hook)
+ (add-hook 'after-change-major-mode-hook 'ergoemacs-setup-local-prefixes)
(undo-tree-mode 1)
(shift-select-mode t)
(delete-selection-mode 1)
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index 51c7543..8288765 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -66,6 +66,7 @@
(defvar ergoemacs-emulation-mode-map-alist)
(defvar ergoemacs-mode)
(defvar ergoemacs-ignore-advice)
+(defvar ergoemacs-read-local-emulation-mode-map-alist)
(defvar ergoemacs-display-char-list nil
"List of characters and fonts and if they display or not.")
- [elpa] 47/117: theme component support for if/dolist/mapc/mapcar/when, (continued)
- [elpa] 47/117: theme component support for if/dolist/mapc/mapcar/when, Matthew Fidler, 2014/07/25
- [elpa] 49/117: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/25
- [elpa] 43/117: Setup local overrides outside of minibuffers and overriding keymaps, Matthew Fidler, 2014/07/25
- [elpa] 52/117: Take out org-italic, Matthew Fidler, 2014/07/25
- [elpa] 51/117: Fix F8 map, Matthew Fidler, 2014/07/25
- [elpa] 50/117: Add lookup of C-g to ergoemacs-keyboard-quit, Matthew Fidler, 2014/07/25
- [elpa] 55/117: Bug fix for ergoemacs-keyboard-quit, Matthew Fidler, 2014/07/25
- [elpa] 56/117: Add ability to "flatten" a composed keymap; Flatten maps that are always modified, Matthew Fidler, 2014/07/25
- [elpa] 58/117: Remove ergoemacs-read-modal-keymap function, Matthew Fidler, 2014/07/25
- [elpa] 53/117: Don't error on invalid menu., Matthew Fidler, 2014/07/25
- [elpa] 46/117: Install ergoemacs-read-default for every major mode,
Matthew Fidler <=
- [elpa] 54/117: Fix menu keybinding preprocessing, Matthew Fidler, 2014/07/25
- [elpa] 57/117: Add first keyword, and use in minibuffer-setup-hook, Matthew Fidler, 2014/07/25
- [elpa] 60/117: Fix byte-compile warning, Matthew Fidler, 2014/07/25
- [elpa] 62/117: Update ergoemacs-mode-line custom description, Matthew Fidler, 2014/07/25
- [elpa] 61/117: Set ergoemacs-mode-line default to t, Matthew Fidler, 2014/07/25
- [elpa] 63/117: Attempt to fix Issue #278, Matthew Fidler, 2014/07/25
- [elpa] 67/117: Fix Issue #278, Matthew Fidler, 2014/07/25
- [elpa] 59/117: Add ergoemacs-mode-line option, Matthew Fidler, 2014/07/25
- [elpa] 64/117: Add run-hook property, Matthew Fidler, 2014/07/25
- [elpa] 66/117: Allow keymaps to be copied before modifying them, Matthew Fidler, 2014/07/25