From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.bugs Subject: bug#12610: unable to use macro in defadvice Date: Tue, 9 Oct 2012 21:02:58 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1349787819 7134 80.91.229.3 (9 Oct 2012 13:03:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2012 13:03:39 +0000 (UTC) To: 12610@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 09 15:03:45 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLZTM-0002l6-SQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Oct 2012 15:03:44 +0200 Original-Received: from localhost ([::1]:54252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZTG-0001Wu-IC for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Oct 2012 09:03:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZT9-0001Vf-7D for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:03:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLZT7-0003js-V1 for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:03:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZT7-0003jh-Ql for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:03:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TLZTe-0002oo-Gx for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Le Wang Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Oct 2012 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134978783910823 (code B ref -1); Tue, 09 Oct 2012 13:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Oct 2012 13:03:59 +0000 Original-Received: from localhost ([127.0.0.1]:34897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLZTa-0002oW-P2 for submit@debbugs.gnu.org; Tue, 09 Oct 2012 09:03:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41118) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLZTY-0002oJ-B3 for submit@debbugs.gnu.org; Tue, 09 Oct 2012 09:03:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLZSs-0003g5-1D for submit@debbugs.gnu.org; Tue, 09 Oct 2012 09:03:17 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:35595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZSr-0003fy-Tu for submit@debbugs.gnu.org; Tue, 09 Oct 2012 09:03:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZSm-0001Ue-OI for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:03:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLZSd-0003bl-67 for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:03:08 -0400 Original-Received: from mail-qc0-f169.google.com ([209.85.216.169]:58590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLZSd-0003bd-2F for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2012 09:02:59 -0400 Original-Received: by mail-qc0-f169.google.com with SMTP id t2so5349376qcq.0 for ; Tue, 09 Oct 2012 06:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=heGdg1yccVnQtma8MDpS96CMo5gb8yOpQXpTsLZz5pE=; b=kezLGpHM6O0k0Ahmkk7ZzV7Vg8+pfCZiyYDWQy3XLoJ/xsuapdL879UvfX7cRZf0h3 BOgunjjvhXm/7+bYJRHPTmcjQU/ffUlKYfgTEgti8D0vLsxXfhQEydbmCIWu9lXjW59E ihycnqxaky1AKpBHtY8cdaF/MW17vb9+4g/9bD56i0RtALVH/OkqdTSLgQJAByhiXtoU //IjKqLSkJ9B1II7qvlwwZfdTTnwI6d4wuuiHJ/Yy67KctNyULux54dkv3At1dXsti0G TW7+2iX1q30vj2KiT5dpLIb85Z3ZhAsmm0Z6A15yBIgL2P/RK+Fu2almI4MXUIEBV2or yCKA== Original-Received: by 10.224.180.16 with SMTP id bs16mr34711367qab.58.1349787778146; Tue, 09 Oct 2012 06:02:58 -0700 (PDT) Original-Received: by 10.49.50.7 with HTTP; Tue, 9 Oct 2012 06:02:58 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65418 Archived-At: Relevant stackoverflow question: http://stackoverflow.com/questions/12767353/using-macros-in-defadvice I have this simplified macro. (defadvice kill-buffer (around show-diff-rephrase-question activate compile) "Prompt when a buffer is about to be killed." (case (read-char-choice "(s/k/q)? " (append "sSKkQq" nil)) ((?s ?S) ad-do-it) ((?k ?K) ad-do-it) ((?q ?Q) nil)) ad-do-it) If I compile the file and load it, then I get "Invalid function: (115 83)" It works if I evaluate it. -- Le