unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Tedin <federicotedin@gmail.com>
To: Xu Chunyang <mail@xuchunyang.me>, 34065@debbugs.gnu.org
Subject: bug#34065: 26.1; Make edebug-eval-expression support code completion
Date: Sat, 19 Jan 2019 23:14:55 -0300	[thread overview]
Message-ID: <8736poyt0g.fsf@gmail.com> (raw)
In-Reply-To: <m2sgxvhahp.fsf@xuchunyang.me> (Xu Chunyang's message of "Mon, 14 Jan 2019 17:08:50 +0800")

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Xu Chunyang <mail@xuchunyang.me> writes:

> When type e (edebug-eval-expression) within Edebug, I notice there is no code completion, unlike
> M-: (eval-expression). So I wonder if edebug-eval-expression can behave
> like eval-expression, I guess simply replacing read-from-minibuffer with
> read--expression should work, though I've not tried.

I've created a small patch which replaces `read-from-minibuffer' for
`read--expression' in `edebug-eval-expression'. I would appreciate it if
a maintainer could take a quick look.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1069 bytes --]

From ce40da7d2b254be1eee5e5f96d674504525f9b72 Mon Sep 17 00:00:00 2001
From: Federico Tedin <federicotedin@gmail.com>
Date: Sat, 19 Jan 2019 23:02:36 -0300
Subject: [PATCH 1/1] Use read--expression to read expressions in Edebug

* lisp/emacs-lisp/edebug.el: Use read--expression instead of
  read-from-minibuffer to read Emacs Elisp expressions (Bug#34065).
---
 lisp/emacs-lisp/edebug.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 2cd8e48d6e..8b4cb1adc7 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3602,9 +3602,7 @@ edebug-eval-expression
   "Evaluate an expression in the outside environment.
 If interactive, prompt for the expression.
 Print result in minibuffer."
-  (interactive (list (read-from-minibuffer
-		      "Eval: " nil read-expression-map t
-		      'read-expression-history)))
+  (interactive (list (read--expression "Eval: ")))
   (princ
    (edebug-outside-excursion
     (setq values (cons (edebug-eval expr) values))
-- 
2.17.1


  reply	other threads:[~2019-01-20  2:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  9:08 bug#34065: 26.1; Make edebug-eval-expression support code completion Xu Chunyang
2019-01-20  2:14 ` Federico Tedin [this message]
2019-02-20  4:37   ` mail
2019-03-12 23:14     ` Federico Tedin
2019-03-22  4:02       ` Stefan Monnier
2019-03-22 21:25       ` Federico Tedin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736poyt0g.fsf@gmail.com \
    --to=federicotedin@gmail.com \
    --cc=34065@debbugs.gnu.org \
    --cc=mail@xuchunyang.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).