[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Kill ring leak in winemacs macros]
From: |
Kevin Rodgers |
Subject: |
Re: address@hidden: Kill ring leak in winemacs macros] |
Date: |
Wed, 03 Aug 2005 17:12:25 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
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
- address@hidden: Kill ring leak in winemacs macros], Richard M. Stallman, 2005/08/03
- Re: address@hidden: Kill ring leak in winemacs macros], Stuart D. Herring, 2005/08/03
- Re: address@hidden: Kill ring leak in winemacs macros],
Kevin Rodgers <=
- Re: address@hidden: Kill ring leak in winemacs macros], Stuart D. Herring, 2005/08/04
- Re: address@hidden: Kill ring leak in winemacs macros], Stuart D. Herring, 2005/08/16
- Re: address@hidden: Kill ring leak in winemacs macros], Jason Rumney, 2005/08/16
- Re: address@hidden: Kill ring leak in winemacs macros], Jason Rumney, 2005/08/16
- Re: address@hidden: Kill ring leak in winemacs macros], Richard M. Stallman, 2005/08/17
- Re: address@hidden: Kill ring leak in winemacs macros], Kevin Rodgers, 2005/08/18
- Re: address@hidden: Kill ring leak in winemacs macros], Jason Rumney, 2005/08/18
- Re: address@hidden: Kill ring leak in winemacs macros], Stuart D. Herring, 2005/08/18
- Re: address@hidden: Kill ring leak in winemacs macros], Stuart D. Herring, 2005/08/16
- Re: address@hidden: Kill ring leak in winemacs macros], Jason Rumney, 2005/08/16