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

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

[ELPA-diffs] ELPA branch, master, updated. 5f9f173d7488db2922a697debaa15


From: Stefan Monnier
Subject: [ELPA-diffs] ELPA branch, master, updated. 5f9f173d7488db2922a697debaa1579175ef9808
Date: Wed, 21 Aug 2013 18:54:27 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  5f9f173d7488db2922a697debaa1579175ef9808 (commit)
       via  dffe6e58fa0d55147217d45052a36d511325f411 (commit)
       via  5a55f3906d3a0813739ff89671f90cfb0b7e2de8 (commit)
       via  c75fc1abf1fd9575ec4eed0aa9ddc80422023191 (commit)
       via  f5a9a484a66d25fd1c7f75474a5a3633dbe14a1c (commit)
       via  56a7d550696e01e6c56dc8eafec0d64765e64ff5 (commit)
       via  8b488b910ba3de9fb398a47a825580636f86d7b0 (commit)
       via  70e7eb6c09cee9ead4e425a1847b23ef9b4e2c08 (commit)
       via  e9fde5c956659a1d1f2b0d53002355dfb4f99fc2 (commit)
       via  c843ee6c663e53ee7824fe7cf4c11cce1fd8e4a4 (commit)
       via  96a940e8982472f2ad4321425ed43442374fd5fd (commit)
       via  53e36ddf97600ccc200c3dd982b9b6a25813db70 (commit)
       via  d6d87cd8ba1bb7599ac7148d1b708e2adb555da5 (commit)
      from  b83c372487dda45c3a515df31c05738dd9f8ce6e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f9f173d7488db2922a697debaa1579175ef9808
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 21 14:54:13 2013 -0400

    * packages/eldoc-eval/eldoc-eval.el: Put the custom vars in the eldoc-eval
    group, where they seem to belong.  Fix up naming conventions.
    (eldoc-eval-preferred-function): Rename from eval-preferred-function.
    (eldoc-display-message-no-interference-p): Use an advice again, but this 
time
    I think I wrote it correctly.
    (eldoc-in-minibuffer-mode-map): Rename from eldoc-mode-in-minibuffer-map.
    (eldoc-in-minibuffer-mode): Don't bother specifying the keymap now that 
we're
    using the standard name.
    (eldoc-run-in-minibuffer): Rename from run-eldoc-in-minibuffer.
    (eldoc-eval-expression): Rename from eval-expression-with-eldoc.

diff --git a/packages/eldoc-eval/eldoc-eval.el 
b/packages/eldoc-eval/eldoc-eval.el
index 02158e7..bf208e0 100644
--- a/packages/eldoc-eval/eldoc-eval.el
+++ b/packages/eldoc-eval/eldoc-eval.el
@@ -30,7 +30,7 @@
 ;;
 ;; By default with this package `M-:' will use `pp-eval-expression'
 ;; instead of `eval-expression'; you can change that by setting
-;; `eval-preferred-function'.
+;; `eldoc-eval-preferred-function'.
 ;;
 ;; It also provides a convenient macro to enable eldoc support
 ;; in your own functions using minibuffer or in your defadvices,
@@ -63,22 +63,18 @@
 (defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
   "A function to display eldoc info.
 Should take one arg: the string to display"
-  :group 'eldoc
   :type 'function)
 
 (defcustom eldoc-show-in-mode-line-delay 12
   "The time we show eldoc when Emacs is idle."
-  :group 'eldoc
   :type 'number)
 
-(defcustom eval-preferred-function 'pp-eval-expression
+(defcustom eldoc-eval-preferred-function 'pp-eval-expression
   "Preferred function to use with `M-:'."
-  :group 'lisp
   :type 'function)
 
 (defcustom  eldoc-in-minibuffer-own-frame-p nil
   "Whether minibuffer has its own frame or not."
-  :group 'lisp
   :type 'boolean)
 
 ;;; Compatibility with Emacs-24.4
@@ -86,22 +82,18 @@ Should take one arg: the string to display"
 ;; with Emacs-24.4 show the eldoc info of current-buffer while
 ;; minibuffer is in use, disable this and inline old Emacs behavior.
 ;;
-(defconst eldoc-eval--old-message-function (and (boundp 
'eldoc-message-function)
-                                                eldoc-message-function))
-
-(defun eldoc-display-message-no-interference-p ()
-  (let (result)
-    (and eldoc-mode
-         (not executing-kbd-macro)
-         (setq result (not (and (boundp 'edebug-active) edebug-active)))
-         (if (and (not eldoc-in-minibuffer-mode)
-                  ;; If this is non--nil we are in emacs-24.4
-                  eldoc-eval--old-message-function)
-             result
-             ;; Having this mode operate in an active minibuffer/echo area 
causes
-             ;; interference with what's going on there.
-             (not cursor-in-echo-area)
-             (not (eq (selected-window) (minibuffer-window)))))))
+(defconst eldoc-eval--old-message-function
+  (and (boundp 'eldoc-message-function) eldoc-message-function))
+
+(defadvice eldoc-display-message-no-interference-p
+    (after eldoc-eval activate)
+  (when eldoc-in-minibuffer-mode
+    (setq ad-return-value
+          (and ad-return-value
+               ;; Having this mode operate in an active minibuffer/echo area
+               ;; causes interference with what's going on there.
+               (not cursor-in-echo-area)
+               (not (eq (selected-window) (minibuffer-window)))))))
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
@@ -121,12 +113,11 @@ See `with-eldoc-in-minibuffer'."
   `(let ((timer (and eldoc-in-minibuffer-mode
                      (run-with-idle-timer
                       eldoc-idle-delay
-                      'repeat 'run-eldoc-in-minibuffer))))
+                      'repeat #'eldoc-run-in-minibuffer))))
      (unwind-protect
          (minibuffer-with-setup-hook
-             ;; When minibuffer is activated in body,
-             ;; store it.
-             'eldoc-store-minibuffer
+             ;; When minibuffer is activated in body, store it.
+             #'eldoc-store-minibuffer
            ,@body)
        (and timer (cancel-timer timer))
        ;; Each time a minibuffer exits or aborts
@@ -176,16 +167,16 @@ See `with-eldoc-in-minibuffer'."
       (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag))
       (error "No active minibuffer found")))
 
-(defvar eldoc-mode-in-minibuffer-map
+(defvar eldoc-in-minibuffer-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "M-:") 'eval-expression-with-eldoc)
+    ;; FIXME: Should we use [remap eval-expression] instead?
+    (define-key map (kbd "M-:") 'eldoc-eval-expression)
     map))
 
 ;;;###autoload
 (define-minor-mode eldoc-in-minibuffer-mode
     "Show eldoc for current minibuffer input."
   :global t
-  :keymap eldoc-mode-in-minibuffer-map
   (if eldoc-in-minibuffer-mode
       (progn
         (add-hook 'minibuffer-exit-hook
@@ -201,7 +192,7 @@ See `with-eldoc-in-minibuffer'."
            (setq eldoc-message-function eldoc-eval--old-message-function))
       (define-key minibuffer-local-map (kbd "C-@") 'set-mark-command)))
 
-(defun run-eldoc-in-minibuffer ()
+(defun eldoc-run-in-minibuffer ()
   (let ((buf (window-buffer (active-minibuffer-window))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
@@ -223,11 +214,11 @@ See `with-eldoc-in-minibuffer'."
       (error (message "Eldoc in minibuffer error: %S" err)))))
 
 ;;;###autoload
-(defun eval-expression-with-eldoc ()
+(defun eldoc-eval-expression ()
   "Eval expression with eldoc support in mode-line."
   (interactive)
   (with-eldoc-in-minibuffer
-    (call-interactively eval-preferred-function)))
+    (call-interactively eldoc-eval-preferred-function)))
 
 
 (provide 'eldoc-eval)

commit dffe6e58fa0d55147217d45052a36d511325f411
Merge: b83c372 5a55f39
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 21 14:09:47 2013 -0400

    Sync from eldoc-eval/master


commit 5a55f3906d3a0813739ff89671f90cfb0b7e2de8
Author: Thierry Volpiatto <address@hidden>
Date:   Mon Aug 19 09:04:59 2013 +0200

    * eldoc-eval.el (eldoc-display-message-no-interference-p): Fix for 
emacs-24.3.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index e6cbfee..02158e7 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -94,7 +94,9 @@ Should take one arg: the string to display"
     (and eldoc-mode
          (not executing-kbd-macro)
          (setq result (not (and (boundp 'edebug-active) edebug-active)))
-         (if (not eldoc-in-minibuffer-mode)
+         (if (and (not eldoc-in-minibuffer-mode)
+                  ;; If this is non--nil we are in emacs-24.4
+                  eldoc-eval--old-message-function)
              result
              ;; Having this mode operate in an active minibuffer/echo area 
causes
              ;; interference with what's going on there.

commit c75fc1abf1fd9575ec4eed0aa9ddc80422023191
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Aug 17 13:29:14 2013 +0200

    * eldoc-eval.el (eldoc-in-minibuffer-mode): Disable mode-line rolling with 
minibuffer-exit-hook.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 77a2f1d..e6cbfee 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -186,6 +186,9 @@ See `with-eldoc-in-minibuffer'."
   :keymap eldoc-mode-in-minibuffer-map
   (if eldoc-in-minibuffer-mode
       (progn
+        (add-hook 'minibuffer-exit-hook
+                  (lambda ()
+                    (setq eldoc-mode-line-rolling-flag nil)))
         (and (boundp 'eldoc-message-function)
              (setq eldoc-message-function 'message))
         (define-key minibuffer-local-map (kbd "C-@")

commit f5a9a484a66d25fd1c7f75474a5a3633dbe14a1c
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Aug 17 13:20:34 2013 +0200

    * eldoc-eval.el: Add group eldoc-eval.
    (eldoc-mode-line-toggle-rolling): be sure user call this from minibuf.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 2e8df04..77a2f1d 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -56,6 +56,10 @@
 ;;  Enable displaying eldoc info in something else
 ;;  Than minibuffer when this one is in use.
 ;;
+(defgroup eldoc-eval nil
+  "Show eldoc infos in mode line while minibuffer is in use."
+  :group 'eldoc)
+
 (defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
   "A function to display eldoc info.
 Should take one arg: the string to display"
@@ -81,7 +85,7 @@ Should take one arg: the string to display"
 ;; New implementation of eldoc in minibuffer that come
 ;; with Emacs-24.4 show the eldoc info of current-buffer while
 ;; minibuffer is in use, disable this and inline old Emacs behavior.
-
+;;
 (defconst eldoc-eval--old-message-function (and (boundp 
'eldoc-message-function)
                                                 eldoc-message-function))
 
@@ -165,7 +169,10 @@ See `with-eldoc-in-minibuffer'."
 
 (defun eldoc-mode-line-toggle-rolling ()
   (interactive)
-  (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag)))
+  (if (and eldoc-in-minibuffer-mode
+           (minibuffer-window-active-p (selected-window)))
+      (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag))
+      (error "No active minibuffer found")))
 
 (defvar eldoc-mode-in-minibuffer-map
   (let ((map (make-sparse-keymap)))

commit 56a7d550696e01e6c56dc8eafec0d64765e64ff5
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Aug 17 06:55:24 2013 +0200

    * eldoc-eval.el: Change eldoc-minor-mode-string when mode is enabled.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 6499f71..2e8df04 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -182,7 +182,9 @@ See `with-eldoc-in-minibuffer'."
         (and (boundp 'eldoc-message-function)
              (setq eldoc-message-function 'message))
         (define-key minibuffer-local-map (kbd "C-@")
-          'eldoc-mode-line-toggle-rolling))
+          'eldoc-mode-line-toggle-rolling)
+        (setq eldoc-minor-mode-string " Eldoc-eval"))
+      (setq eldoc-minor-mode-string " Eldoc")
       (and (boundp 'eldoc-message-function)
            (setq eldoc-message-function eldoc-eval--old-message-function))
       (define-key minibuffer-local-map (kbd "C-@") 'set-mark-command)))

commit 8b488b910ba3de9fb398a47a825580636f86d7b0
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Aug 17 06:46:04 2013 +0200

    * eldoc-eval.el: Fix eldoc not working when mode is disabled.
    (eldoc-eval--old-message-function): new internal.
    (eldoc-display-message-no-interference-p): now a defun.(already adviced in 
slime)
    (eldoc-in-minibuffer-mode): reenable correctly all when toggling.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index ed18463..6499f71 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -82,20 +82,20 @@ Should take one arg: the string to display"
 ;; with Emacs-24.4 show the eldoc info of current-buffer while
 ;; minibuffer is in use, disable this and inline old Emacs behavior.
 
-(when (boundp 'eldoc-message-function)
-  (setq eldoc-message-function 'message)
+(defconst eldoc-eval--old-message-function (and (boundp 
'eldoc-message-function)
+                                                eldoc-message-function))
 
-  (defadvice eldoc-display-message-no-interference-p
-      (around eldoc-eval activate)
-    (if (not eldoc-in-minibuffer-mode)
-        ad-do-it
+(defun eldoc-display-message-no-interference-p ()
+  (let (result)
     (and eldoc-mode
          (not executing-kbd-macro)
-         (not (and (boundp 'edebug-active) edebug-active))
-         ;; Having this mode operate in an active minibuffer/echo area causes
-         ;; interference with what's going on there.
-         (not cursor-in-echo-area)
-           (not (eq (selected-window) (minibuffer-window)))))))
+         (setq result (not (and (boundp 'edebug-active) edebug-active)))
+         (if (not eldoc-in-minibuffer-mode)
+             result
+             ;; Having this mode operate in an active minibuffer/echo area 
causes
+             ;; interference with what's going on there.
+             (not cursor-in-echo-area)
+             (not (eq (selected-window) (minibuffer-window)))))))
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
@@ -174,11 +174,18 @@ See `with-eldoc-in-minibuffer'."
 
 ;;;###autoload
 (define-minor-mode eldoc-in-minibuffer-mode
-  "Show eldoc for current minibuffer input."
+    "Show eldoc for current minibuffer input."
   :global t
   :keymap eldoc-mode-in-minibuffer-map
-  (define-key minibuffer-local-map (kbd "C-@")
-    'eldoc-mode-line-toggle-rolling))
+  (if eldoc-in-minibuffer-mode
+      (progn
+        (and (boundp 'eldoc-message-function)
+             (setq eldoc-message-function 'message))
+        (define-key minibuffer-local-map (kbd "C-@")
+          'eldoc-mode-line-toggle-rolling))
+      (and (boundp 'eldoc-message-function)
+           (setq eldoc-message-function eldoc-eval--old-message-function))
+      (define-key minibuffer-local-map (kbd "C-@") 'set-mark-command)))
 
 (defun run-eldoc-in-minibuffer ()
   (let ((buf (window-buffer (active-minibuffer-window))))

commit 70e7eb6c09cee9ead4e425a1847b23ef9b4e2c08
Author: Thierry Volpiatto <address@hidden>
Date:   Wed Aug 14 15:53:39 2013 +0200

    * README.md: update

diff --git a/README.md b/README.md
index 6a7f102..d290902 100644
--- a/README.md
+++ b/README.md
@@ -10,11 +10,21 @@ but you can have eldoc info somewhere else by setting
 
 By default with this package `M-:` will use `pp-eval-expression`
 instead of `eval-expression`; you can change that by setting
-`eval-preferred-function`.
+`eval-preferred-function` to something else.
 
 It also provides a convenient macro to enable eldoc support
 in your own functions using minibuffer or in your defadvices,
-that is `with-eldoc-in-minibuffer`.
+that is `with-eldoc-in-minibuffer`, e.g:
+
+```lisp
+(defadvice edebug-eval-expression (around with-eldoc activate)
+  "This advice enable eldoc support."
+  (interactive (list (with-eldoc-in-minibuffer
+                       (read-from-minibuffer
+                        "Eval: " nil read-expression-map t
+                        'read-expression-history))))
+  ad-do-it)
+```
 
 Users of own minibuffer frame will have to set
 `eldoc-in-minibuffer-own-frame-p` to non-nil.

commit e9fde5c956659a1d1f2b0d53002355dfb4f99fc2
Author: Thierry Volpiatto <address@hidden>
Date:   Wed Aug 14 15:50:25 2013 +0200

    * README.md: format code for markdown.

diff --git a/README.md b/README.md
index 527cd43..6a7f102 100644
--- a/README.md
+++ b/README.md
@@ -6,21 +6,21 @@ This package enables eldoc support when minibuffer is in use.
 
 Eldoc info is shown by default in mode-line,
 but you can have eldoc info somewhere else by setting
-`eldoc-in-minibuffer-show-fn' to another function (e.g `tooltip-show').
+`eldoc-in-minibuffer-show-fn` to another function (e.g `tooltip-show`).
 
-By default with this package `M-:' will use `pp-eval-expression'
-instead of `eval-expression'; you can change that by setting
-`eval-preferred-function'.
+By default with this package `M-:` will use `pp-eval-expression`
+instead of `eval-expression`; you can change that by setting
+`eval-preferred-function`.
 
 It also provides a convenient macro to enable eldoc support
 in your own functions using minibuffer or in your defadvices,
-that is `with-eldoc-in-minibuffer'.
+that is `with-eldoc-in-minibuffer`.
 
 Users of own minibuffer frame will have to set
-`eldoc-in-minibuffer-own-frame-p' to non-nil.
+`eldoc-in-minibuffer-own-frame-p` to non-nil.
 
-You can turn On/Off eldoc support in minibuffer any time
-with `eldoc-in-minibuffer-mode'.
+You can turn On/Off eldoc support in minibuffer at any time
+with `eldoc-in-minibuffer-mode`.
 
 # Install:
 

commit c843ee6c663e53ee7824fe7cf4c11cce1fd8e4a4
Author: Thierry Volpiatto <address@hidden>
Date:   Wed Aug 14 15:47:05 2013 +0200

    * README.md: Update.

diff --git a/README.md b/README.md
index e69de29..527cd43 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,32 @@
+Enable eldoc support when minibuffer is in use.
+
+# Commentary:
+
+This package enables eldoc support when minibuffer is in use.
+
+Eldoc info is shown by default in mode-line,
+but you can have eldoc info somewhere else by setting
+`eldoc-in-minibuffer-show-fn' to another function (e.g `tooltip-show').
+
+By default with this package `M-:' will use `pp-eval-expression'
+instead of `eval-expression'; you can change that by setting
+`eval-preferred-function'.
+
+It also provides a convenient macro to enable eldoc support
+in your own functions using minibuffer or in your defadvices,
+that is `with-eldoc-in-minibuffer'.
+
+Users of own minibuffer frame will have to set
+`eldoc-in-minibuffer-own-frame-p' to non-nil.
+
+You can turn On/Off eldoc support in minibuffer any time
+with `eldoc-in-minibuffer-mode'.
+
+# Install:
+
+Add to .emacs:
+
+```lisp
+   (autoload 'eldoc-in-minibuffer-mode "eldoc-eval")
+   (eldoc-in-minibuffer-mode 1)
+```

commit 96a940e8982472f2ad4321425ed43442374fd5fd
Author: Thierry Volpiatto <address@hidden>
Date:   Tue Aug 13 18:25:50 2013 +0200

    * eldoc-eval.el (eldoc-in-minibuffer-mode): Bind 
`eldoc-mode-line-toggle-rolling' to address@hidden

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 5686a2a..ed18463 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -177,7 +177,7 @@ See `with-eldoc-in-minibuffer'."
   "Show eldoc for current minibuffer input."
   :global t
   :keymap eldoc-mode-in-minibuffer-map
-  (define-key minibuffer-local-map (kbd "<C-M-right>")
+  (define-key minibuffer-local-map (kbd "C-@")
     'eldoc-mode-line-toggle-rolling))
 
 (defun run-eldoc-in-minibuffer ()

commit 53e36ddf97600ccc200c3dd982b9b6a25813db70
Author: Thierry Volpiatto <address@hidden>
Date:   Tue Aug 13 18:00:07 2013 +0200

    * eldoc-eval.el: Rename `eldoc-mode-in-minibuffer' to 
`eldoc-in-minibuffer-mode'.
    Fix comments.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 833603d..5686a2a 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -39,19 +39,19 @@
 ;; Users of own minibuffer frame will have to set
 ;; `eldoc-in-minibuffer-own-frame-p' to non-nil.
 ;;
-;; You can turn off eldoc support in minibuffer any time
-;; by setting `eldoc-in-minibuffer' to nil.
+;; You can turn On/Off eldoc support in minibuffer any time
+;; with `eldoc-in-minibuffer-mode'.
+;;
+;;; Install:
+;; Add to .emacs:
+;;
+;;   (autoload 'eldoc-in-minibuffer-mode "eldoc-eval")
+;;   (eldoc-in-minibuffer-mode 1)
+
 
 ;;; Code:
 (require 'eldoc)
 
-;; FIXME: This has no autoloads and (require 'eldoc-eval) will change Emacs's
-;; behavior, against usual conventions.  The fix is to define
-;; eldoc-in-minibuffer as a (global) minor mode, then autoload it.  So the
-;; default value will be nil, and the user can enable it with
-;; (eldoc-in-minibuffer 1) or by customizing eldoc-in-minibuffer, rather than
-;; by adding (require 'eldoc-eval) in her .emacs.
-
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
 ;;  Than minibuffer when this one is in use.
@@ -87,7 +87,7 @@ Should take one arg: the string to display"
 
   (defadvice eldoc-display-message-no-interference-p
       (around eldoc-eval activate)
-    (if (not eldoc-mode-in-minibuffer)
+    (if (not eldoc-in-minibuffer-mode)
         ad-do-it
     (and eldoc-mode
          (not executing-kbd-macro)
@@ -112,7 +112,7 @@ See `with-eldoc-in-minibuffer'."
 (defmacro with-eldoc-in-minibuffer (&rest body)
   "Enable eldoc support for minibuffer input that runs in BODY."
   (declare (indent 0) (debug t))
-  `(let ((timer (and eldoc-mode-in-minibuffer
+  `(let ((timer (and eldoc-in-minibuffer-mode
                      (run-with-idle-timer
                       eldoc-idle-delay
                       'repeat 'run-eldoc-in-minibuffer))))
@@ -173,7 +173,7 @@ See `with-eldoc-in-minibuffer'."
     map))
 
 ;;;###autoload
-(define-minor-mode eldoc-mode-in-minibuffer
+(define-minor-mode eldoc-in-minibuffer-mode
   "Show eldoc for current minibuffer input."
   :global t
   :keymap eldoc-mode-in-minibuffer-map

commit d6d87cd8ba1bb7599ac7148d1b708e2adb555da5
Author: Thierry Volpiatto <address@hidden>
Date:   Tue Aug 13 17:41:21 2013 +0200

    * eldoc-eval.el (eldoc-mode-in-minibuffer): now a minor mode.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 5be33e3..833603d 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -56,11 +56,6 @@
 ;;  Enable displaying eldoc info in something else
 ;;  Than minibuffer when this one is in use.
 ;;
-(defcustom eldoc-in-minibuffer t
-  "Turn on eldoc in minibuffer."
-  :group 'eldoc
-  :type 'bolean)
-
 (defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
   "A function to display eldoc info.
 Should take one arg: the string to display"
@@ -92,7 +87,7 @@ Should take one arg: the string to display"
 
   (defadvice eldoc-display-message-no-interference-p
       (around eldoc-eval activate)
-    (if (not eldoc-in-minibuffer)
+    (if (not eldoc-mode-in-minibuffer)
         ad-do-it
     (and eldoc-mode
          (not executing-kbd-macro)
@@ -117,10 +112,10 @@ See `with-eldoc-in-minibuffer'."
 (defmacro with-eldoc-in-minibuffer (&rest body)
   "Enable eldoc support for minibuffer input that runs in BODY."
   (declare (indent 0) (debug t))
-  `(let ((timer (and eldoc-in-minibuffer
+  `(let ((timer (and eldoc-mode-in-minibuffer
                      (run-with-idle-timer
                       eldoc-idle-delay
-                      'repeat 'eldoc-mode-in-minibuffer))))
+                      'repeat 'run-eldoc-in-minibuffer))))
      (unwind-protect
          (minibuffer-with-setup-hook
              ;; When minibuffer is activated in body,
@@ -171,10 +166,21 @@ See `with-eldoc-in-minibuffer'."
 (defun eldoc-mode-line-toggle-rolling ()
   (interactive)
   (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag)))
-(define-key minibuffer-local-map (kbd "<C-M-right>") 
'eldoc-mode-line-toggle-rolling)
 
-(defun eldoc-mode-in-minibuffer ()
+(defvar eldoc-mode-in-minibuffer-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "M-:") 'eval-expression-with-eldoc)
+    map))
+
+;;;###autoload
+(define-minor-mode eldoc-mode-in-minibuffer
   "Show eldoc for current minibuffer input."
+  :global t
+  :keymap eldoc-mode-in-minibuffer-map
+  (define-key minibuffer-local-map (kbd "<C-M-right>")
+    'eldoc-mode-line-toggle-rolling))
+
+(defun run-eldoc-in-minibuffer ()
   (let ((buf (window-buffer (active-minibuffer-window))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
@@ -195,18 +201,13 @@ See `with-eldoc-in-minibuffer'."
       (beginning-of-buffer nil)
       (error (message "Eldoc in minibuffer error: %S" err)))))
 
+;;;###autoload
 (defun eval-expression-with-eldoc ()
   "Eval expression with eldoc support in mode-line."
   (interactive)
   (with-eldoc-in-minibuffer
     (call-interactively eval-preferred-function)))
 
-;; Bind it to `M-:'.
-
-;; FIXME: Turn eldoc-in-minibuffer into a global minor mode, and place this
-;; binding in its keymap.
-(global-set-key [remap eval-expression] 'eval-expression-with-eldoc)
-
 
 (provide 'eldoc-eval)
 ;;; eldoc-eval.el ends here

-----------------------------------------------------------------------

Summary of changes:
 packages/eldoc-eval/README.md     |   42 +++++++++++++
 packages/eldoc-eval/eldoc-eval.el |  117 ++++++++++++++++++++----------------
 2 files changed, 107 insertions(+), 52 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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