unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to fix Emacs24 compiler warning w/o breaking code for previous versions
@ 2011-06-16 17:44 Eric Schulte
  2011-06-17  3:10 ` Stefan Monnier
  2011-06-17  7:19 ` David Engster
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Schulte @ 2011-06-16 17:44 UTC (permalink / raw)
  To: emacs-devel

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/



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-20  7:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 17:44 How to fix Emacs24 compiler warning w/o breaking code for previous versions Eric Schulte
2011-06-17  3:10 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).