粘贴快捷键报"Wrong type argument: consp, nil"

这是自定义的复制粘贴快捷键,在emacs25.2上没问题,升级到emacs26后按spc o p报上面的错误,请教下是原因

  (defun copy-to-clipboard ()
    "Copies selection to x-clipboard."
    (interactive)
    (if (display-graphic-p)
        (progn
          (message "Yanked region to x-clipboard!")
          (call-interactively 'clipboard-kill-ring-save)
          )
      (if (region-active-p)
          (progn
            (shell-command-on-region (region-beginning) (region-end) "xsel -i -b")
            (message "Yanked region to clipboard!")
            (deactivate-mark))
        (message "No region active; can't yank to clipboard!")))
    )

  (defun paste-from-clipboard ()
    "Pastes from x-clipboard."
    (interactive)
    (if (display-graphic-p)
        (progn
          (clipboard-yank)
          (message "graphics active")
          )
      (insert (shell-command-to-string "xsel -o -b"))
      )
    )
  (evil-leader/set-key "o c" 'copy-to-clipboard)
  (evil-leader/set-key "o p" 'paste-from-clipboard)

toggle-debug-on-error看看是哪里出的错

很像是参数问题,没太看明白

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  setcar(nil nil)
  (let ((prefix (car args))) (setcar args (if (equal (quote (4)) prefix) nil prefix)) (apply yank-func args) (if (and (not (equal (quote (4)) prefix)) (not (member major-mode spacemacs-indent-sensitive-modes)) (or (derived-mode-p (quote prog-mode)) (member major-mode spacemacs-indent-sensitive-modes))) (let ((transient-mark-mode nil) (save-undo buffer-undo-list)) (spacemacs/yank-advised-indent-function (region-beginning) (region-end)))))
  spacemacs//yank-indent-region(#f(compiled-function (&optional arg) "Reinsert (\"paste\") the last stretch of killed text.\nMore precisely, reinsert the most recent kill, which is the\nstretch of killed text most recently killed OR yanked.  Put point\nat the end, and set mark at the beginning without activating it.\nWith just \\[universal-argument] as argument, put point at beginning, and mark at end.\nWith argument N, reinsert the Nth most recent kill.\n\nThis command honors the `yank-handled-properties' and\n`yank-excluded-properties' variables, and the `yank-handler' text\nproperty, as described below.\n\nProperties listed in `yank-handled-properties' are processed,\nthen those listed in `yank-excluded-properties' are discarded.\n\nIf STRING has a non-nil `yank-handler' property anywhere, the\nnormal insert behavior is altered, and instead, for each contiguous\nsegment of STRING that has a given value of the `yank-handler'\nproperty, that value is used as follows:\n\nThe value of a `yank-handler' property must be a list of one to four\nelements, of the form (FUNCTION PARAM NOEXCLUDE UNDO).\nFUNCTION, if non-nil, should be a function of one argument (the\n object to insert); FUNCTION is called instead of `insert'.\nPARAM, if present and non-nil, is passed to FUNCTION (to be handled\n in whatever way is appropriate; e.g. if FUNCTION is `yank-rectangle',\n PARAM may be a list of strings to insert as a rectangle).  If PARAM\n is nil, then the current segment of STRING is used.\nIf NOEXCLUDE is present and non-nil, the normal removal of\n `yank-excluded-properties' is not performed; instead FUNCTION is\n responsible for the removal.  This may be necessary if FUNCTION\n adjusts point before or after inserting the object.\nUNDO, if present and non-nil, should be a function to be called\n by `yank-pop' to undo the insertion of the current PARAM.  It is\n given two arguments, the start and end of the region.  FUNCTION\n may set `yank-undo-function' to override UNDO.\n\nSee also the command `yank-pop' (\\[yank-pop])." (interactive "*P") #<bytecode 0x24f8eb>))
  apply(spacemacs//yank-indent-region #f(compiled-function (&optional arg) "Reinsert (\"paste\") the last stretch of killed text.\nMore precisely, reinsert the most recent kill, which is the\nstretch of killed text most recently killed OR yanked.  Put point\nat the end, and set mark at the beginning without activating it.\nWith just \\[universal-argument] as argument, put point at beginning, and mark at end.\nWith argument N, reinsert the Nth most recent kill.\n\nThis command honors the `yank-handled-properties' and\n`yank-excluded-properties' variables, and the `yank-handler' text\nproperty, as described below.\n\nProperties listed in `yank-handled-properties' are processed,\nthen those listed in `yank-excluded-properties' are discarded.\n\nIf STRING has a non-nil `yank-handler' property anywhere, the\nnormal insert behavior is altered, and instead, for each contiguous\nsegment of STRING that has a given value of the `yank-handler'\nproperty, that value is used as follows:\n\nThe value of a `yank-handler' property must be a list of one to four\nelements, of the form (FUNCTION PARAM NOEXCLUDE UNDO).\nFUNCTION, if non-nil, should be a function of one argument (the\n object to insert); FUNCTION is called instead of `insert'.\nPARAM, if present and non-nil, is passed to FUNCTION (to be handled\n in whatever way is appropriate; e.g. if FUNCTION is `yank-rectangle',\n PARAM may be a list of strings to insert as a rectangle).  If PARAM\n is nil, then the current segment of STRING is used.\nIf NOEXCLUDE is present and non-nil, the normal removal of\n `yank-excluded-properties' is not performed; instead FUNCTION is\n responsible for the removal.  This may be necessary if FUNCTION\n adjusts point before or after inserting the object.\nUNDO, if present and non-nil, should be a function to be called\n by `yank-pop' to undo the insertion of the current PARAM.  It is\n given two arguments, the start and end of the region.  FUNCTION\n may set `yank-undo-function' to override UNDO.\n\nSee also the command `yank-pop' (\\[yank-pop])." (interactive "*P") #<bytecode 0x24f8eb>) nil)
  yank()
  clipboard-yank()
  (progn (clipboard-yank) (message "graphics active"))
  (if (display-graphic-p) (progn (clipboard-yank) (message "graphics active")) (insert (shell-command-to-string "xsel -o -b")))
  paste-from-clipboard()
  funcall-interactively(paste-from-clipboard)
  call-interactively(paste-from-clipboard nil nil)
  command-execute(paste-from-clipboard)