emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Remaining org-src.el free variable warnings
Date: Mon, 25 May 2015 18:01:14 -0400	[thread overview]
Message-ID: <87y4kc2u6t.fsf@kyleam.com> (raw)

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

             reply	other threads:[~2015-05-25 22:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 22:01 Kyle Meyer [this message]
2015-05-25 23:21 ` Remaining org-src.el free variable warnings Nicolas Goaziou
2015-05-26  1:57   ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4kc2u6t.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).