Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The reason it doesn't work is because you don't have a symbol. You have a cons cell containing a quote and the symbol.

    I'd just leave out the length 1 check too. If you have (quote fred barney), you're already pretty crazy. :)

    --
    • Randal L. Schwartz
    • Stonehenge
  • Emacs has a syntax for interpolation which you might find easier. Instead of:

    (list 'global-set-key key
        (append '(lambda () "~keyfunction~"
         (interactive)) body)))

    You might prefer

    `(global-set-key key
        ,@(append '(lambda () "~keyfunction~"
         (interactive)) body)))

    Basically, backquote starts a list you can interpolate into; comma interpolates a single item; comma + at-sign splices in a list at that point. As usual, more info in BackquoteSyntax [emacswiki.org]