[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 104/287: Fix many compiler warnings with ergoemacs-advices.el
From: |
Matthew Fidler |
Subject: |
[elpa] 104/287: Fix many compiler warnings with ergoemacs-advices.el |
Date: |
Wed, 02 Jul 2014 14:45:02 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit aa28b1e8b1290e3e7ce13be39506cab78b82afcd
Author: Matthew L. Fidler <address@hidden>
Date: Tue Jun 17 07:52:38 2014 -0500
Fix many compiler warnings with ergoemacs-advices.el
---
ergoemacs-advices.el | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/ergoemacs-advices.el b/ergoemacs-advices.el
index 4c77204..c337638 100644
--- a/ergoemacs-advices.el
+++ b/ergoemacs-advices.el
@@ -27,19 +27,13 @@
;;
;;; Code:
+
+(eval-when-compile (require 'cl))
+
+
(defvar ergoemacs-advices '()
"List of advices to enable and disable when ergoemacs is running.")
-(defvar ergoemacs-dir
- (file-name-directory
- (or
- load-file-name
- (buffer-file-name)))
- "Ergoemacs directory.")
-(add-to-list 'load-path ergoemacs-dir)
-(require 'ergoemacs-shortcuts)
-(require 'ergoemacs-unbind)
-
(defmacro ergoemacs-define-overrides (&rest body)
"Force the define-keys to work"
@@ -93,8 +87,12 @@ Also adds keymap-flag for user-defined keys run with
`run-mode-hooks'."
(defvar ergoemacs-global-override-rm-keys '())
;;; Advices enabled or disabled with ergoemacs-mode
(defvar ergoemacs-ignore-advice nil)
+
+(declare-function ergoemacs-theme-component--ignore-globally-defined-key
+ "ergoemacs-theme-engine.el")
+(defvar ergoemacs-global-changed-cache)
+(defvar ergoemacs-global-not-changed-cache)
(defun ergoemacs-global-set-key-after (key)
-
(if ergoemacs-ignore-advice nil
(let ((kd (key-description key)))
(unless (or (and (vectorp key)
@@ -177,11 +175,20 @@ This assumes any key defined while running a hook is a
user-defined hook."
(let ((ergoemacs-run-mode-hooks t))
ad-do-it))
+(declare-function ergoemacs-with-global
+ "ergoemacs-shortcuts.el")
(defadvice turn-on-undo-tree-mode (around ergoemacs-undo-tree-mode activate)
"Make `ergoemacs-mode' and undo-tree compatible."
(ergoemacs-with-global
ad-do-it))
+;;; Unfortunately, the advice route doesn't seem to work :(
+(declare-function ergoemacs-real-substitute-command-keys
"ergoemacs-advices.el" (string) t)
+(fset 'ergoemacs-real-substitute-command-keys (symbol-function
'substitute-command-keys))
+
+(defvar ergoemacs-original-keys-to-shortcut-keys-regexp)
+(defvar ergoemacs-original-keys-to-shortcut-keys)
+(declare-function ergoemacs-pretty-key "ergoemacs-translate.el")
(defun ergoemacs-substitute-command (string &optional map)
"Substitutes command STRING
will add MAP to substitution."
@@ -220,6 +227,7 @@ will add MAP to substitution."
"\\([ \t]\\{2,\\}\\|\t\\)" "\\1 | `"
string))))))) 0 -2))
+(declare-function ergoemacs-unicode-char "ergoemacs-translate.el")
(defun ergoemacs-substitute-map (string &optional function)
(save-match-data
(let* (ret
@@ -278,7 +286,7 @@ will add MAP to substitution."
ret)))
-
+(defvar ergoemacs-mode)
(defun ergoemacs-substitute-command-keys (string)
"`ergoemacs-mode' replacement for substitute-command-keys.
Actual substitute-command-keys is always in
`ergoemacs-real-substitute-command-keys'"
@@ -313,10 +321,10 @@ Actual substitute-command-keys is always in
`ergoemacs-real-substitute-command-k
(setq ret (buffer-string))))
ret)))
-;;; Unfortunately, the advice route doesn't seem to work :(
-
-(fset 'ergoemacs-real-substitute-command-keys (symbol-function
'substitute-command-keys))
-
+(declare-function ergoemacs-real-completing-read "ergoemacs-advices.el"
+ (prompt collection &optional
+ predicate require-match
+ initial-input hist def inherit-input-method) t)
(fset 'ergoemacs-real-completing-read (symbol-function 'completing-read))
(defun ergoemacs-completing-read (prompt collection &optional
predicate require-match
@@ -333,6 +341,4 @@ The real command is always `ergoemacs-real-completing-read'.
(provide 'ergoemacs-advices)
;;;;;;;;;;;;;;;;;;;;;;;;`';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ergoemacs-advices.el ends here
-;; Local Variables:
;; coding: utf-8-emacs
-;; End:
- [elpa] 143/287: Make test dir the same as work dir, (continued)
- [elpa] 143/287: Make test dir the same as work dir, Matthew Fidler, 2014/07/02
- [elpa] 196/287: Clean up open last closed buffer. (Issue #237), Matthew Fidler, 2014/07/02
- [elpa] 100/287: Reduce Readme.md and add build status, Matthew Fidler, 2014/07/02
- [elpa] 94/287: Fixed shortcut keys., Matthew Fidler, 2014/07/02
- [elpa] 127/287: Update documentation again., Matthew Fidler, 2014/07/02
- [elpa] 203/287: Fix the C-e test, Matthew Fidler, 2014/07/02
- [elpa] 198/287: More flexible redo, Issue #239, Matthew Fidler, 2014/07/02
- [elpa] 96/287: Fix shortcut keys again., Matthew Fidler, 2014/07/02
- [elpa] 199/287: Update ergoemacs-test-layout so it wont parse the function, Matthew Fidler, 2014/07/02
- [elpa] 135/287: Fix defcustom, Matthew Fidler, 2014/07/02
- [elpa] 104/287: Fix many compiler warnings with ergoemacs-advices.el,
Matthew Fidler <=
- [elpa] 97/287: First attempt for Cask without Cask (I'm on windows), Matthew Fidler, 2014/07/02
- [elpa] 116/287: Take out compiler warnings from ergoemacs-shortcuts.el, Matthew Fidler, 2014/07/02
- [elpa] 89/287: Fix most keybinding issues, Matthew Fidler, 2014/07/02
- [elpa] 113/287: No more warnings for ergoemacs-modal.el; mapc->dolist, Matthew Fidler, 2014/07/02
- [elpa] 132/287: Be more careful when redefining maps., Matthew Fidler, 2014/07/02
- [elpa] 129/287: Fix compiler warnings for ergoemacs-unbind.el, Matthew Fidler, 2014/07/02
- [elpa] 140/287: Fix Byte Compile Warnings, Matthew Fidler, 2014/07/02
- [elpa] 117/287: Take out compiler errors from ergoemacs-test, Matthew Fidler, 2014/07/02
- [elpa] 93/287: Add ergoemacs-shortcut-emulation-mode-map-alist, Matthew Fidler, 2014/07/02
- [elpa] 119/287: Fix byte-compile warnings for ergoemacs-macros.el, Matthew Fidler, 2014/07/02