When I execute cs<old-text-object><new-text-object> (i.e. any cs or ds action) I get the following error. Anyone know how to resolve this or at least suggestions on debugging it?

evil-motion-range: Symbol’s value as variable is void: syntax-ppss-last

I've installed Evil and Evil Surround via

(use-package evil
  :ensure t
  (evil-mode t)
  (evil-set-initial-state 'term-mode 'emacs)
  (define-key evil-normal-state-map (kbd "C-d") 'evil-scroll-down)
  (define-key evil-visual-state-map (kbd "C-d") 'evil-scroll-down)
  (define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up)
  (define-key evil-visual-state-map (kbd "C-u") 'evil-scroll-up)
  (define-key evil-insert-state-map (kbd "C-u")
    (lambda ()
      (evil-delete (point-at-bol) (point)))))

(use-package evil-surround
  :ensure t
  (global-evil-surround-mode 1))

1 Answer 1


There is no such variable in the version of Emacs that you are using. Perhaps you are using a version of Evil that expects a different version of Emacs, where that variable is defined.

In any case, please remove everything from the code you show that is not relevant to reproducing the problem. E.g., I'm guessing that the key-binding code is not relevant to the problem.

If you think there is a bug in Emacs, use M-x report-emacs-bug to report it. If you think there is a bug in Evil, report it to the Evil maintainer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.