[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Execute as a command a yanked text
From: |
Mathias Dahl |
Subject: |
Re: Execute as a command a yanked text |
Date: |
Wed, 03 May 2006 11:35:30 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
Stefan Horomnea <stefan@softexperience.ro> writes:
> Hello,
>
> Do you have any idea how to execute a text that was previously killed ?
> I mean, I have a function named insert-html-table.
>
> This code works:
> (command-execute 'insert-html-table)
>
> This code doesn't work:
> (command-execute (car kill-ring-yank-pointer))
>
> *and I have previously killed "insert-html-table"
>
> and, this also works (insert (car kill-ring-yank-pointer)) - and
> inserts the text: "insert-html-table".
The problem seems to be that (car kill-ring-yank-pointer) returns a
*string*, not a symbol which `command-execute' needs. Maybe this
works (untested):
(command-execute (make-symbol (car kill-ring-yank-pointer)))
Try it.