From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shiyao Ma Newsgroups: gmane.emacs.help Subject: How to advice save-buffers-kill-terminal? Date: Thu, 14 Apr 2016 21:16:55 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1460639844 2931 80.91.229.3 (14 Apr 2016 13:17:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2016 13:17:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 14 15:17:19 2016 Return-path: Envelope-to: geh-help-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 1aqh93-0007th-0T for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Apr 2016 15:17:17 +0200 Original-Received: from localhost ([::1]:39288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqh92-0000BN-8h for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Apr 2016 09:17:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqh8o-00007e-Mg for help-gnu-emacs@gnu.org; Thu, 14 Apr 2016 09:17:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqh8i-0001jx-L9 for help-gnu-emacs@gnu.org; Thu, 14 Apr 2016 09:17:02 -0400 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:35414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqh8i-0001jc-By for help-gnu-emacs@gnu.org; Thu, 14 Apr 2016 09:16:56 -0400 Original-Received: by mail-wm0-x22e.google.com with SMTP id a140so146984152wma.0 for ; Thu, 14 Apr 2016 06:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=introo-me.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=LZJOORq5SQtaCljKsDv9eJt7o7uhsButUvdt2C3l41Y=; b=w95aP4iOfO7cUK3ki9TioErjzf3uHpxb3dJ8Ei97TyNbhe98HMfHgvY3M/qEBj2Tga k/O95ruh7zBEQQ5G0IBpOpLSPg+9GiQf8OUCNn6fjgUqrqgwzJUPfmdnx+z8mXlNZw+T 4DEyhhBul4c4iHbhI+bMetEktRifCYrU1r86nQxPOjKY6Xiqzu1FE9WcGiOF5RdHksK1 pFVVpwGNgb6GIZTaCFdXwKAcl6qn6puwTLw5YlEMjH/4hUuinv6kjcEypbQl0e08odQl +N6Ld9yXGIFH/UNyogWKDYY+ObMU2J0X+08AWKkkeVlTvQrGS6QHrI+uoxWz+KxfZXFL YvWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=LZJOORq5SQtaCljKsDv9eJt7o7uhsButUvdt2C3l41Y=; b=kfjw1iEaJwgALj+0bGfbnDFky1PzLzbpPxNFwWBpLzQ3tlRHFHXmAb2v5bzEjewEDL KQn4ETyS8CK9jQUTzWbDVoijYHSbt0Qdr0cC2nEpgLtd8tW/TSgs6s74X4JArSVQ+CUm maEVf4NiyaWEIUV7TGqLBIFcB/hgR/lcPMOj9YaCWQJr2Kao3yM/Qhzx05NeVzK5ruX1 Oik2wTlXji7MWi7M+xaBiT57EvBFiRHrBd7nn/1rMUWIwMmKOjt9nmkMrEJYAZn5c7SF tecwmTgmFOB7XUFYgYz4/e99f3ojNCl68r1vq3mIXokZkawY3/38vI4bAkU/8Rebir5s DROQ== X-Gm-Message-State: AOPr4FV/iXRmHu7CLgAama6RlGHZkawSLAT7+bUZ9bnbk28OcFscMk9Xp1/sDt+zRbm4RTR/SCT2hJGAlXniJQ== X-Received: by 10.194.43.170 with SMTP id x10mr15868215wjl.73.1460639815137; Thu, 14 Apr 2016 06:16:55 -0700 (PDT) Original-Received: by 10.28.24.196 with HTTP; Thu, 14 Apr 2016 06:16:55 -0700 (PDT) X-Originating-IP: [143.89.244.107] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109763 Archived-At: For the following code: (advice-add 'save-buffers-kill-terminal :around #'(lambda (oldfunc &rest r) (cl-flet ((yes-or-no-p (msg) (message "test:%S" msg))) (apply oldfunc r)))) The yes-or-no-p in cl-flet doesn't affect the calling of yes-or-no-p inside save-buffers-kill-terminal. After a quick look, I found the suspicious *- lexical-binding:t -*- in files.el. Any possibility to modify that yes-or-no-p inside save-buffers-kill-terminal? (I know I can define a save-buffers-kill-terminal on my own, but that will sooner or later not in sync with the official one). Regards. --=20 =E5=90=BE=E8=BC=A9=E3=81=AF=E7=8C=AB=E3=81=A7=E3=81=82=E3=82=8B=E3=80=82=E3= =83=9B=E3=83=BC=E3=83=A0=E3=83=BC=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AFhttps:= //introo.me =E3=80=82