emacs - Elisp destructuring-bind for cons cell? -
i'd do
(destructuring-bind (start end) (bounds-of-thing-at-point 'symbol))
but bounds-of-thing-at-point
returns cons cell , not list, destructuring-bind
doesn't work. work case?
since destructuring-bind
macro cl
package, may worthwhile common lisp documentation more examples.
this page shows syntax of macro. note (wholevar reqvars optvars . var)
. though i'm not sure cl
version of destructuring-bind
supports of less common cases (many keywords make sense when used common lisp macros / functions, don't have meaning in emacs lisp).
thus:
(destructuring-bind (start . end) (bounds-of-thing-at-point 'symbol) ;...)
should work.
Comments
Post a Comment