How to yank in a search in an emacs lisp function
Pergunta
(defun search-for-what-is-just-killed ()
(interactive)
(search-forward latestkillringvariable? nil t)
)
How to use "yank" in an emacs lisp function?
Solução
You can access directly the kill-ring
list to access the latest kill:
(substring-no-properties (car kill-ring))
The substring-no-properties
bit is important since text is kept in the kill ring with additional properties (like fontification specific to a particular mode and you'll probably want to strip those).
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow