bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#30635: No compiler warning if code forgets to require cl-lib


From: Stefan Monnier
Subject: bug#30635: No compiler warning if code forgets to require cl-lib
Date: Thu, 22 Mar 2018 17:53:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>> There's no compiler warning if a library uses cl-lib without requiring it.
>>> I assume this is because bytecomp.el requires cl-lib.
>> Should we apply the patch below?
> Works for me, thanks.

Doesn't work for me, OTOH:

    % src/emacs --batch --eval "(eval-after-load 'cl-lib '(debug t))"  -f 
batch-byte-compile lisp/emacs-lisp/bytecomp.el
    Debugger entered--beginning evaluation of function call form:
      (lambda nil (debug t))()
      
eval-after-load-helper("/home/monnier/src/emacs/trunk/lisp/emacs-lisp/cl-lib.elc")
      run-hook-with-args(eval-after-load-helper 
"/home/monnier/src/emacs/trunk/lisp/emacs-lisp/cl-lib.elc")
      
do-after-load-evaluation("/home/monnier/src/emacs/trunk/lisp/emacs-lisp/cl-lib.elc")
      require(cl-lib)
      require(seq)
      require(map)
      dir-locals-read-from-dir("/home/monnier/src/emacs/trunk/")
      hack-dir-local-variables()
      hack-local-variables(no-mode)
      normal-mode(t)
      byte-compile-file("lisp/emacs-lisp/bytecomp.el")
      batch-byte-compile-file("lisp/emacs-lisp/bytecomp.el")
      batch-byte-compile()
      command-line-1(("--eval" "(eval-after-load 'cl-lib '(debug t))" "-f" 
"batch-byte-compile" "lisp/emacs-lisp/bytecomp.el"))
      command-line()
      normal-top-level()

and if you look at `dir-locals-read-from-dir`, you'll see that it does
(require 'map) and then uses its `map-merge(-with)`.


        Stefan "the pressure to preload cl-lib is definitely mounting"





reply via email to

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