unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: GNU Emacs Help <help-gnu-emacs@gnu.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, steve-humphreys@gmx.com
Subject: Re: Making ielm behave like a shell (getting to previous commands using the up-arrow key)
Date: Thu, 17 Dec 2020 12:13:09 +0300	[thread overview]
Message-ID: <X9shJcVLlvEhriB7@protected.rcdrun.com> (raw)
In-Reply-To: <X9sfsT7RFLw6ke6H@protected.rcdrun.com>

But not to fiddle with global variables, I could as well use
setq-local

(defun eval-with-setq-sexp ()
  (interactive)
  (let* ((sexp (thing-at-point 'list))
	 (end (length sexp))
	 (_ (set-text-properties 0 end nil sexp))
	 (sexp (replace-regexp-in-string "^(" "(setq-local " sexp)))
  (message "%s" (eval (car (read-from-string sexp))))))




  reply	other threads:[~2020-12-17  9:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  3:02 Making ielm behave like a shell (getting to previous commands using the up-arrow key) steve-humphreys
2020-12-17  3:34 ` Okam
2020-12-17  4:27 ` Michael Heerdegen
2020-12-17  4:44   ` steve-humphreys
2020-12-17  5:02     ` Michael Heerdegen
2020-12-17  5:17       ` steve-humphreys
2020-12-17  9:06         ` Jean Louis
2020-12-17  9:13           ` Jean Louis [this message]
2020-12-17 22:29           ` Michael Heerdegen
2020-12-18  5:05             ` Jean Louis
2020-12-18  9:01               ` Michael Heerdegen
2020-12-18 11:19                 ` Jean Louis
2020-12-18 17:14                   ` Drew Adams
2020-12-18 18:36                     ` Jean Louis
2020-12-18 19:11                       ` Drew Adams
2020-12-18 19:53                         ` Jean Louis
2020-12-18 21:15                           ` Drew Adams
2020-12-19  2:07                   ` Michael Heerdegen
2020-12-19  2:51                     ` Drew Adams
2020-12-18 11:28                 ` Jean Louis
2020-12-19  1:55                   ` Michael Heerdegen
2020-12-19  2:45                     ` Drew Adams
2020-12-19  1:57               ` Michael Heerdegen
2020-12-17  8:22   ` Joost Kremers
2020-12-18 10:20     ` Philip K.

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=X9shJcVLlvEhriB7@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=steve-humphreys@gmx.com \
    /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.
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).