* lisp/thingatpt.el (thing-at-point--beginning-of-symbol): Special
op that errors out when there's no symbols in the buffer before
point (bug#14234).
(symbol): Use it.
(put 'sexp 'beginning-op 'thing-at-point--beginning-of-sexp)
+;; Symbols
+
+(put 'symbol 'beginning-op 'thing-at-point--beginning-of-symbol)
+
+(defun thing-at-point--beginning-of-symbol ()
+ "Move point to the beginning of the current symbol."
+ (and (re-search-backward "\\(\\sw\\|\\s_\\)+")
+ (skip-syntax-backward "w_")))
+
;; Lists
(put 'list 'bounds-of-thing-at-point 'thing-at-point-bounds-of-list-at-point)
(should (eq (symbol-at-point) 'bar))))
(ert-deftest test-symbol-thing-3 ()
- :expected-result :failed ; FIXME bug#14234
(with-temp-buffer
(insert "`[[`(")
(goto-char 2)