all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eric Schulte <schulte.eric@gmail.com>, emacs-devel@gnu.org
Subject: Re: How to fix Emacs24 compiler warning w/o breaking code for previous versions
Date: Fri, 17 Jun 2011 09:12:59 +0530	[thread overview]
Message-ID: <811uytyvgc.fsf@gmail.com> (raw)
In-Reply-To: <jwvfwn9p3f6.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 16 Jun 2011 23:10:26 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 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?
>
> IMNSHO:
> - The simplest solution is to only support a single or a very limited
>   number of Emacs versions.
> - Another good one is to support many versions, only pay attention to
>   warnings in the most recent supported version, and accept some warnings
>   as "better have the warnings than break backward compatibility".
> - The next best one is to do as above except that you additionally wrap
>   the remaining warnings in `with-no-warnings' (and regularly remove
>   those `with-no-warnings' to remind you of the problems you can't fix
>   yet because of backward compatibility).
> I strongly recommend against aiming to silence warnings on all the
> supported Emacs versions.  It's a waste of time and leads to poor code
> (e.g. ugly/brittle byte-compiler hacks, cc-bytecomp comes to mind, I'd
> better stop here or I'll have nightmares again).


I was hoping that there is an elisp equivalent for C-like

#if emacs-version > a
    do this
#else
    do that
#endif



>
>
>         Stefan
>
>

-- 



  reply	other threads:[~2011-06-17  3:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=811uytyvgc.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=schulte.eric@gmail.com \
    /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.