Hacker News new | ask | show | jobs
by to3m 4146 days ago
Here's an example of this kind of thing from some emacs lisp I wrote (which I hope survived the transition to the HN comment box):

    (setq imenu-generic-expression
      (let ((ident '(1+ (any "A-Za-z0-9_"))))
        `(("plugin" ,(rx line-start
                         (0+ space) "plugin"
                         (1+ space) (eval ident)
                         (1+ space) (group (eval ident)))
                         1))))
Of course, you can do this with string concatenation, but I think this syntax makes it clearer what's going on.