code: def disableHook(self, msgObj):
          
          # Unpack the data structure.
          macroName, keysequence = msgObj.data
          if macroName != self.qteMacroName():
              self.qteMain.qtesigKeyseqComplete.disconnect(
                  self.disableHook)
              self.killListIdx = -1
docs: Disable yank-pop.
  
          The ``enableHook`` method (see below) connects this method
          to the ``qtesigKeyseqComplete`` signal to catch
          consecutive calls to this ``yank-pop`` macro. Once the user
          issues a key sequence for any other macro but this one, the
          kill-list index will be set to a negative index, effectively
          disabling the macro.