[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected behavior byte-compiling (with-no-warnings (require...))
From: |
Glenn Morris |
Subject: |
Re: Unexpected behavior byte-compiling (with-no-warnings (require...)) |
Date: |
Mon, 07 Sep 2009 21:28:57 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Juanma Barranquero wrote:
> (with-no-warnings (require 'cl))
>
> the byte-compilation output is this:
>
> In toplevel form:
> test.el:4:15:Error: Wrong type argument: sequencep, two
Try this patch:
*** bytecomp.el.~2.257.~ 2009-09-05 12:00:44.000000000 -0700
--- bytecomp.el 2009-09-07 18:03:35.000000000 -0700
***************
*** 2387,2392 ****
--- 2387,2400 ----
;; Return nil so the forms are not output twice.
nil)
+ (put 'with-no-warnings 'byte-hunk-handler
+ 'byte-compile-file-form-with-no-warnings)
+ (defun byte-compile-file-form-with-no-warnings (form)
+ ;; cf byte-compile-file-form-progn.
+ (let (byte-compile-warnings)
+ (mapc 'byte-compile-file-form (cdr form))
+ nil))
+
;; This handler is not necessary, but it makes the output from dont-compile
;; and similar macros cleaner.
(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval)