all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: emacs-devel@gnu.org
Subject: How to fix Emacs24 compiler warning w/o breaking code for previous versions
Date: Thu, 16 Jun 2011 10:44:27 -0700	[thread overview]
Message-ID: <87oc1xd62s.fsf@gmail.com> (raw)

Hi,

I've been working to address the elisp byte-compiler warnings thrown
while compiling the current Org-mode head, and I do not know how to
address cases where the byte-compiler insists on usage of a new feature
not present in older Emacsen without breaking Org-mode support of those
Emacsen.  I'm writing to ask for the "best practices" approach?

Here are two examples.

On Emacs23 the `filter-buffer-substring-functions' variable (introduced
in May of 2010) is preferred over the `buffer-substring-filters'
function which is now deprecated.  Using the former breaks all prior
Emacsen while using the later throws compiler warnings on Emacs24.

Similarly, the `interactive-p' function is now defunct and not liked by
the byte compiler, however the suggested replacement function
`called-interactive-p' requires an argument in Emacs24, and accepts no
arguments in Emacs22.

The obvious solution here would be to replace both of these instances
with new Org-mode functions which check either Emacs version or check
for existence/definition of the relevant variable/function and then
behave accordingly.  That however seems uglier than just using the
deprecated version of these functions.

Any advice is greatly appreciated.

Thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



             reply	other threads:[~2011-06-16 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 17:44 Eric Schulte [this message]
2011-06-17  3:10 ` How to fix Emacs24 compiler warning w/o breaking code for previous versions Stefan Monnier
2011-06-17  3:42   ` Jambunathan K
2011-06-17  6:34     ` Stephen J. Turnbull
2011-06-17  7:17       ` Eli Zaretskii
2011-06-19 21:14     ` Daniel Colascione
2011-06-20  7:53     ` David Kastrup
2011-06-17  4:45   ` Eric Schulte
2011-06-17  7:19 ` David Engster

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

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

  git send-email \
    --in-reply-to=87oc1xd62s.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.