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 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel