Skip to main content
4 events
when toggle format what by license comment
May 27, 2016 at 5:15 vote accept lawlist
May 27, 2016 at 5:15 comment added lawlist I modified your example to make a type of let-bound version for just the duration of the function -- thank you very much -- greatly appreciated: (cl-letf (((symbol-function 'yes-or-no-p) #'y-or-n-p)) (let* ((filename "/private/tmp/foofile") (buf (get-buffer-create "*foo*"))) (with-current-buffer buf (write-file filename) (insert "Every good boy deserves fudge.")) (kill-buffer buf) (delete-file filename)))
May 27, 2016 at 5:09 history edited xuchunyang CC BY-SA 3.0
Add an alternative way
May 27, 2016 at 4:53 history answered xuchunyang CC BY-SA 3.0