[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [bug] Symbol's function definition is void: when-let
From: |
Eric Schulte |
Subject: |
Re: [O] [bug] Symbol's function definition is void: when-let |
Date: |
Thu, 19 May 2011 11:06:53 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Oh!
My fault, `when-let' is defined locally on my Emacs, but apparently is
not an official Emacs function, careless committing on my part.
I've just pushed up a fix.
Thanks -- Eric
Nick Dokos <address@hidden> writes:
> Bernd Weiss <address@hidden> wrote:
>
>> export to LaTeX/PDF. It stops with "Symbol's function definition is
>> void: when-let", i.e.
>>
>> Fontifying org-src-fontification:emacs-lisp-mode...
>> (regexps...............)
>> Symbol's function definition is void: when-let
>>
>
> Yup: Eric S.'s commit (tip when I pulled a few minutes ago) uses when-let,
> which is not defined in my emacs either. It's either a typo or an Eric S.
> special.
>
> Nick
>
> ,----
> | commit 72c154e38e526b5f8bb5f200fb31bc6fec145ba6
> | Author: Eric Schulte <address@hidden>
> | Date: Thu May 19 07:37:33 2011 -0600
> |
> | expand noweb refs when ":noweb yes" during export
> |
> | * lisp/ob-exp.el (org-babel-exp-do-export): Use `org-babel-exp-code'
> | to generate code block output.
> | (org-babel-exp-code): Re-create the code block body for exporting
> | source code.
> |
> | diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
> | index d700f6d..ce04f13 100644
> | --- a/lisp/ob-exp.el
> | +++ b/lisp/ob-exp.el
> | @@ -238,9 +238,17 @@ The function respects the value of the :exports header
> argument."
> | (clean () (unless (eq type 'inline) (org-babel-remove-result info))))
> | (case (intern (or (cdr (assoc :exports (nth 2 info))) "code"))
> | ('none (silently) (clean) "")
> | - ('code (silently) (clean) nil)
> | + ('code (silently) (clean) (org-babel-exp-code info))
> | ('results (org-babel-exp-results info type nil hash) "")
> | - ('both (org-babel-exp-results info type nil hash) nil))))
> | + ('both (org-babel-exp-results info type nil hash)
> | + (org-babel-exp-code info)))))
> | +
> | +(defun org-babel-exp-code (info)
> | + "Return the original code block formatted for export."
> | + (org-fill-template "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC\n"
> | + `(("lang" . ,(nth 0 info))
> | + ("flags" . ,(when-let (f (nth 3 info)) (concat " " f)))
> | + ("body" . ,(nth 1 info)))))
> |
> | (defun org-babel-exp-results (info type &optional silent hash)
> | "Evaluate and return the results of the current code block for export.
> `----
>
--
Eric Schulte
http://cs.unm.edu/~eschulte/