[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Remaining org-src.el free variable warnings
From: |
Kyle Meyer |
Subject: |
[O] Remaining org-src.el free variable warnings |
Date: |
Mon, 25 May 2015 18:01:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Compiling org-src.el since 71641bc3a0882b has given free variable
warnings. One of these was fixed in e50472d926f92c, but some still
remain:
In org-src--contents-area:
org-src.el:303:49:Warning: reference to free variable `beg'
org-src.el:303:53:Warning: reference to free variable `end'
Despite the line numbers given, I think these are referring to the
line marked below (line 284 in org-src.el).
#+begin_src elisp
(defun org-src--contents-area (datum)
"Return contents boundaries of DATUM.
DATUM is an element or object. Return a list (BEG END CONTENTS)
where BEG and END are buffer positions and CONTENTS is a string."
(let ((type (org-element-type datum)))
(cond
((eq type 'footnote-definition)
(let* ((beg (org-with-wide-buffer
(goto-char (org-element-property :post-affiliated datum))
(search-forward "]")))
(end (or (org-element-property :contents-end datum) beg)))
(list beg end (buffer-substring-no-properties beg end))))
((org-element-property :contents-begin datum)
(list (org-element-property :contents-begin datum)
(org-element-property :contents-end datum)
(buffer-substring-no-properties beg end))) ; <---- HERE
((memq type '(example-block export-block src-block))
[...]
(t (error "Unsupported element or object: %s" type)))))
#+end_src
Also, what case does that branch of cond cover?
--
Kyle
- [O] Remaining org-src.el free variable warnings,
Kyle Meyer <=