help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Making ielm behave like a shell (getting to previous commands using


From: Jean Louis
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
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

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 via email to

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