GNU bug report logs - #6275
23.2; warning-suppress-types is void after defadvice

Previous Next

Package: emacs;

Reported by: SAITO Takuya <tabmore <at> gmail.com>

Date: Wed, 26 May 2010 15:46:01 UTC

Severity: normal

Merged with 6373, 6682

Found in version 23.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6275 in the body.
You can then email your comments to 6275 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6275; Package emacs. (Wed, 26 May 2010 15:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to SAITO Takuya <tabmore <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 May 2010 15:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: SAITO Takuya <tabmore <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; warning-suppress-types is void after defadvice
Date: Wed, 26 May 2010 23:28:50 +0900 (JST)
Start Emacs-23.2 with "emacs -Q" and evaluate below
with \C-x\C-e in *scratch* buffer:

(defadvice forward-line (before sample activate compile) (setq xxx zzz))

(byte-compile (lambda () (setq xxx zzz)))

then, *Backtrace* buffer is displayed

Debugger entered--Lisp error: (void-variable warning-suppress-types)
  display-warning(bytecomp "Symbol's value as variable is void: warning-suppress-types" :error "*Compile-Log*")
  byte-compile-log-warning("Symbol's value as variable is void: warning-suppress-types" nil :error)
  byte-compile-report-error((void-variable warning-suppress-types))
  byte-compile((lambda nil (setq xxx zzz)))
  eval((byte-compile (lambda nil (setq xxx zzz))))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)


ad-compile-function() binds warning-suppress-types with let.
I guess warnings.el is loaded inside of that let-binding.



In GNU Emacs 23.2.1 (i386-mingw-nt6.0.6002)
 of 2010-05-08 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 6.0.6002
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: JPN
  value of $XMODIFIERS: nil
  locale-coding-system: cp932
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <down-mouse-1> <mouse-1> C-y 
C-p C-p C-e C-x C-e C-n C-x C-e q M-x r e p o <tab> 
r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
forward-line
Entering debugger...
Back to top level.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug help-mode easymenu view debug
warnings byte-opt bytecomp byte-compile advice help-fns advice-preload
japan-util tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32
disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




Merged 6275 6373. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 07 Jun 2010 23:13:02 GMT) Full text and rfc822 format available.

Forcibly Merged 6275 6373. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Wed, 09 Jun 2010 01:28:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 09 Jun 2010 01:28:02 GMT) Full text and rfc822 format available.

Notification sent to SAITO Takuya <tabmore <at> gmail.com>:
bug acknowledged by developer. (Wed, 09 Jun 2010 01:28:03 GMT) Full text and rfc822 format available.

Message #14 received at 6275-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: SAITO Takuya <tabmore <at> gmail.com>
Subject: Re: bug#6275: 23.2; warning-suppress-types is void after defadvice
Date: Tue, 08 Jun 2010 21:22:25 -0400
forcemerge 6275 6373
thanks

> Debugger entered--Lisp error: (void-variable warning-suppress-types)
[...]
> ad-compile-function() binds warning-suppress-types with let.
> I guess warnings.el is loaded inside of that let-binding.

Indeed, thank you.  I've installed the patch below which should fix it.


        Stefan


=== modified file 'lisp/emacs-lisp/advice.el'
--- lisp/emacs-lisp/advice.el	2010-02-15 20:03:22 +0000
+++ lisp/emacs-lisp/advice.el	2010-06-09 01:16:08 +0000
@@ -2684,6 +2684,8 @@
       ;; because `byte-compile' uses `fset':
       (ad-with-auto-activation-disabled
        (require 'bytecomp)
+       (require 'warnings)              ;To define warning-suppress-types
+                                        ;before we let-bind it.
        (let ((symbol (make-symbol "advice-compilation"))
 	     (byte-compile-warnings byte-compile-warnings)
              ;; Don't pop up windows showing byte-compiler warnings.





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 09 Jun 2010 01:28:03 GMT) Full text and rfc822 format available.

Notification sent to Kevin Ryde <user42 <at> zip.com.au>:
bug acknowledged by developer. (Wed, 09 Jun 2010 01:28:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 07 Jul 2010 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2011 21:51:02 GMT) Full text and rfc822 format available.

Forcibly Merged 6275 6373 6682. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2011 21:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Nov 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.