all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Obtaining a Lisp form from a file
@ 2017-07-25 17:20 Udyant Wig
  2017-07-25 17:31 ` John Mastro
  2017-07-25 18:22 ` Emanuel Berg
  0 siblings, 2 replies; 4+ messages in thread
From: Udyant Wig @ 2017-07-25 17:20 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-26  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 17:20 Obtaining a Lisp form from a file Udyant Wig
2017-07-25 17:31 ` John Mastro
2017-07-26  7:22   ` Udyant Wig
2017-07-25 18:22 ` Emanuel Berg

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.