emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to fix Emacs24 compiler warning w/o breaking code for previous versi


From: Eric Schulte
Subject: How to fix Emacs24 compiler warning w/o breaking code for previous versions
Date: Thu, 16 Jun 2011 10:44:27 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]