|
From: | John Mastro |
Subject: | Re: Obtaining a Lisp form from a file |
Date: | Tue, 25 Jul 2017 10:31:46 -0700 |
Udyant Wig <udyant.wig@gmail.com> wrote: > 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) (with-temp-buffer (insert-file-contents file) (read (current-buffer))) Hope that helps John
[Prev in Thread] | Current Thread | [Next in Thread] |