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

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

[elpa] master 852ae26 14/22: Use quote instead of function to prevent co


From: Oleh Krehel
Subject: [elpa] master 852ae26 14/22: Use quote instead of function to prevent compiler warnings
Date: Fri, 16 Oct 2015 10:06:58 +0000

branch: master
commit 852ae2668a242e03b66a4cfd6182b0964cd9ed7e
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Use quote instead of function to prevent compiler warnings
    
    * hydra.el (defhydra): In generated `define-key' statement use `quote'
      instead of `function'.
    
    * hydra-test.el (hydra-red-error): Update test.
    
    This should fix the byte compiler warning for hydra-examples.el.
---
 hydra-test.el |   58 +++++++++++++++++++++++++++-----------------------------
 hydra.el      |    2 +-
 2 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/hydra-test.el b/hydra-test.el
index dd6f31e..cc871a7 100644
--- a/hydra-test.el
+++ b/hydra-test.el
@@ -119,14 +119,14 @@ Call the head: `first-error'."
           (setq hydra-curr-body-fn
                 (quote hydra-error/body)))
         (condition-case err
-            (progn
-              (setq this-command
-                    (quote first-error))
-              (call-interactively
-               (function first-error)))
-          ((quit error)
-           (message "%S" err)
-           (unless hydra-lv (sit-for 0.8))))
+                        (progn
+                          (setq this-command
+                                (quote first-error))
+                          (call-interactively
+                           (function first-error)))
+                        ((quit error)
+                         (message "%S" err)
+                         (unless hydra-lv (sit-for 0.8))))
         (when hydra-is-helpful
           (if hydra-lv
               (lv-message
@@ -157,14 +157,14 @@ Call the head: `next-error'."
           (setq hydra-curr-body-fn
                 (quote hydra-error/body)))
         (condition-case err
-            (progn
-              (setq this-command
-                    (quote next-error))
-              (call-interactively
-               (function next-error)))
-          ((quit error)
-           (message "%S" err)
-           (unless hydra-lv (sit-for 0.8))))
+                        (progn
+                          (setq this-command
+                                (quote next-error))
+                          (call-interactively
+                           (function next-error)))
+                        ((quit error)
+                         (message "%S" err)
+                         (unless hydra-lv (sit-for 0.8))))
         (when hydra-is-helpful
           (if hydra-lv
               (lv-message
@@ -195,14 +195,14 @@ Call the head: `previous-error'."
           (setq hydra-curr-body-fn
                 (quote hydra-error/body)))
         (condition-case err
-            (progn
-              (setq this-command
-                    (quote previous-error))
-              (call-interactively
-               (function previous-error)))
-          ((quit error)
-           (message "%S" err)
-           (unless hydra-lv (sit-for 0.8))))
+                        (progn
+                          (setq this-command
+                                (quote previous-error))
+                          (call-interactively
+                           (function previous-error)))
+                        ((quit error)
+                         (message "%S" err)
+                         (unless hydra-lv (sit-for 0.8))))
         (when hydra-is-helpful
           (if hydra-lv
               (lv-message
@@ -222,14 +222,12 @@ Call the head: `previous-error'."
         (define-key global-map (kbd "M-g")
           nil))
       (define-key global-map [134217831 104]
-       (function
-        hydra-error/first-error))
+        (quote hydra-error/first-error))
       (define-key global-map [134217831 106]
-       (function
-        hydra-error/next-error))
+        (quote hydra-error/next-error))
       (define-key global-map [134217831 107]
-       (function
-        hydra-error/previous-error))
+        (quote
+         hydra-error/previous-error))
       (defun hydra-error/body nil
         "Create a hydra with a \"M-g\" body and the heads:
 
diff --git a/hydra.el b/hydra.el
index 73d6621..fa4f641 100644
--- a/hydra.el
+++ b/hydra.el
@@ -1030,7 +1030,7 @@ result of `defhydra'."
                                           (if (boundp bind)
                                               (keymapp (symbol-value bind))
                                             t))
-                                     `(define-key ,bind ,final-key (function 
,name)))
+                                     `(define-key ,bind ,final-key (quote 
,name)))
                                     (t
                                      (error "Invalid :bind property `%S' for 
head %S" bind head)))))))
                       heads))



reply via email to

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