[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to advice save-buffers-kill-terminal?
From: |
Shiyao Ma |
Subject: |
How to advice save-buffers-kill-terminal? |
Date: |
Thu, 14 Apr 2016 21:16:55 +0800 |
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.
--
吾輩は猫である。ホームーページはhttps://introo.me <http://introo.me>。
- How to advice save-buffers-kill-terminal?,
Shiyao Ma <=