emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Richard Kim <emacs18@gmail.com>
Cc: Org-Mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: patch to suppress "deprecated cl" warnings plus few others
Date: Wed, 26 Aug 2020 01:05:37 -0400	[thread overview]
Message-ID: <87pn7em1y6.fsf@kyleam.com> (raw)
In-Reply-To: <CAFq8O8v=x0PQKQBRsac81YiZoBb42HED_a=1F7Dzv2Dae-HZvg@mail.gmail.com>

Richard Kim writes:

> Attached patch suppresses byte compiler warnings.

Thanks.  contrib/ doesn't receive much love when it comes to these sorts
of things, and byte-compiling its files is not a pretty sight.

> Subject: [PATCH] Suppressed all "deprecated cl" warnings plus few others.

A "contrib: " prefix on this subject would be useful for orienting log
readers.

Convention nit-pick: Drop the period from the subject.

> diff --git a/contrib/lisp/ob-tcl.el b/contrib/lisp/ob-tcl.el
> index 091eb5d09..d269ad38a 100644
> --- a/contrib/lisp/ob-tcl.el
> +++ b/contrib/lisp/ob-tcl.el
> @@ -31,7 +31,7 @@
>  ;;; Code:
>  (require 'ob)
>  (require 'ob-eval)
> -(eval-when-compile (require 'cl))
> +(eval-when-compile (require 'cl-lib))

The byte-compiler complains after your change:

    contrib/lisp/ob-tcl.el:129:1:Warning: the following functions are
        not known to be defined: case, output, value

These all come from a missed s/case/cl-case/.

>  (defvar org-babel-tangle-lang-exts)
>  (add-to-list 'org-babel-tangle-lang-exts '("tcl" . "tcl"))
> diff --git a/contrib/lisp/org-choose.el b/contrib/lisp/org-choose.el
> index c1006d095..799fd917f 100644
> --- a/contrib/lisp/org-choose.el
> +++ b/contrib/lisp/org-choose.el
> @@ -62,9 +62,7 @@
>  ;;; Requires
>  
>  (require 'org)
> -					;(eval-when-compile
> -					;   (require 'cl))
> -(require 'cl)
> +(require 'cl-lib)

Same applies here.  You took care of s/position/cl-position/ below, but
there are a good number of other symbols that now require a prefix:
defstruct, destructuring-bind, incf, pushnew, first, and second.

>  ;;; Body
>  ;;; The variables
> @@ -357,7 +355,7 @@ setting was changed."
>  (defun org-choose-get-index-in-keywords (ix all-keywords)
>    "Return the index of the current entry."
>    (if ix
> -      (position ix all-keywords
> +      (cl-position ix all-keywords
>  		:test #'equal)))
>

I haven't yet looked beyond the first two files, though I suspect the
other files may have similar issues.  Could you take a closer look and
send an updated patch?


      reply	other threads:[~2020-08-26  5:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-22 18:14 patch to suppress "deprecated cl" warnings plus few others Richard Kim
2020-08-26  5:05 ` Kyle Meyer [this message]

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=87pn7em1y6.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=emacs18@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 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).