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

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

Obtaining a Lisp form from a file


From: Udyant Wig
Subject: Obtaining a Lisp form from a file
Date: Tue, 25 Jul 2017 22:50:08 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Is there a better way to write this?

(let ((foo-buffer (get-buffer-create "*foo*"))
      foo-form)
  (with-current-buffer foo-buffer
    (insert-file-contents foo-file))
  (setq foo-form (read foo-buffer))
  (kill-buffer foo-buffer)
  foo-form)

-- 
... while the ways of art are hard at the best, they will break you if
you go unsustained by belief in what you are trying to do.
                                -- Arthur Quiller-Couch



reply via email to

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