mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Avoid error in case this-command isn't a symbol.
Fixes #664. * yasnippet.el (yas--skip-and-clear-field-p): Only get `delete-selection' property of `this-command' when it's a symbol.
This commit is contained in:
parent
88b7950554
commit
572c73d50b
@ -3390,9 +3390,9 @@ BEG, END and LENGTH like overlay modification hooks."
|
|||||||
(= (point) (yas--field-start field))
|
(= (point) (yas--field-start field))
|
||||||
(require 'delsel)
|
(require 'delsel)
|
||||||
;; `yank' sets `this-command' to t during execution.
|
;; `yank' sets `this-command' to t during execution.
|
||||||
(let ((clearp (get (if (commandp this-command) this-command
|
(let* ((command (if (commandp this-command) this-command
|
||||||
this-original-command)
|
this-original-command))
|
||||||
'delete-selection)))
|
(clearp (if (symbolp command) (get command 'delete-selection))))
|
||||||
(when (and (not (memq clearp '(yank supersede kill)))
|
(when (and (not (memq clearp '(yank supersede kill)))
|
||||||
(functionp clearp))
|
(functionp clearp))
|
||||||
(setq clearp (funcall clearp)))
|
(setq clearp (funcall clearp)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user