From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: [EPeterson@mcdonaldbradley.com: Kill ring leak in winemacs macros]
Date: Wed, 03 Aug 2005 17:12:25 -0600 [thread overview]
Message-ID: <dcrj0s$sgl$1@sea.gmane.org> (raw)
In-Reply-To: <34340.128.165.123.83.1123102769.squirrel@webmail.lanl.gov>
Stuart D. Herring wrote:
> The variables `interprogram-cut-function' and
> `interprogram-paste-function' can be set to nil to suppress the
> synchronization, but this isn't just a customization issue (as in
> "this isn't a problem, you should set X to Y") because the issue only
> arises during keyboard macro execution. If we want to support this,
> presumably we want a new variable thusly:
>
> (defcustom macro-private-kills nil
> "*Non-nil means kill and yank commands executed by a keyboard macro
> don't interact with window system cut and paste facilities."
> :type 'boolean
> :group 'killing
> :version "22.1")
>
> Then `kill-new', `kill-append', and `current-kill' would be modified to
> ignore `interprogram-*-function' if `macro-private-kills' is set and a
> keyboard macro is executing.
It would be simpler to temporarily bind the interprogram-*-functions
variables to nil in execute-kbd-macro.
> Better variable names and/or docstrings are of course welcome.
How about:
(defcustom kbd-macro-disable-interprogram-functions nil
"Disable `interprogram-cut-function' and `interprogram-paste-function'
while executing a keyboard macro. This allows keyboard macros to run
independently of other programs."
:type 'boolean
:group 'killing) ; no keyboard macro or window system group
(defadvice execute-kbd-macro (around
kbd-macro-disable-interprogram-functions
activate)
"Respect `kbd-macro-disable-interprogram-fuctions'."
(let ((interprogram-cut-function
(if kbd-macro-disable-interprogram-functions
nil
interprogram-cut-function))
(interprogram-paste-function
(if kbd-macro-disable-interprogram-functions
nil
interprogram-paste-function)))
ad-do-it))
Or perhaps -ignore- is preferred over -disable- in variable names.
P.S. I know that execute-kbd-macro is a built-in function defined in
src/macros.c, and defadvice is not allowed in the lisp/*.el files. This
is for illustration only.
--
Kevin Rodgers
next prev parent reply other threads:[~2005-08-03 23:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-03 19:10 [EPeterson@mcdonaldbradley.com: Kill ring leak in winemacs macros] Richard M. Stallman
2005-08-03 19:27 ` Stuart D. Herring
2005-08-03 19:52 ` Lennart Borgman
2005-08-03 20:59 ` Stuart D. Herring
2005-08-03 21:41 ` Lennart Borgman
2005-08-04 3:55 ` Eli Zaretskii
2005-08-04 7:25 ` Lennart Borgman
2005-08-03 23:12 ` Kevin Rodgers [this message]
2005-08-04 15:34 ` Stuart D. Herring
2005-08-16 15:07 ` Stuart D. Herring
2005-08-16 16:10 ` Jason Rumney
2005-08-16 16:19 ` Jason Rumney
2005-08-17 6:24 ` Richard M. Stallman
2005-08-18 16:43 ` Kevin Rodgers
2005-08-18 21:15 ` Jason Rumney
2005-08-18 22:17 ` Stuart D. Herring
2005-08-16 16:31 ` Stuart D. Herring
2005-08-16 21:38 ` Jason Rumney
2005-08-18 16:57 ` Kevin Rodgers
2005-08-18 16:56 ` Kevin Rodgers
2005-08-18 17:52 ` Stuart D. Herring
2005-08-04 12:48 ` Richard M. Stallman
[not found] ` <E1E0f9R-0003Pk-NJ@fencepost.gnu.org>
2005-08-04 14:19 ` Lennart Borgman
2005-08-04 15:20 ` Juanma Barranquero
2005-08-05 11:59 ` Richard M. Stallman
2005-08-05 12:43 ` Juanma Barranquero
2005-08-06 6:27 ` Richard M. Stallman
2005-08-05 13:48 ` defadvice in Emacs code (was: " Lennart Borgman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dcrj0s$sgl$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.