Commit 965b9376 authored by Chong Yidong's avatar Chong Yidong
Browse files

* thingatpt.el (thing-at-point-bounds-of-list-at-point): New

function (Bug#3027).
parent bc323c04
2009-04-18 Chong Yidong <>
* thingatpt.el (thing-at-point-bounds-of-list-at-point): New
function (Bug#3027).
2009-04-17 Kenichi Handa <>
* international/uni-decomposition.el: Re-generated.
......@@ -188,8 +188,26 @@ a symbol as a valid THING."
;; Lists
(put 'list 'end-op (lambda () (up-list 1)))
(put 'list 'beginning-op 'backward-sexp)
(put 'list 'bounds-of-thing-at-point 'thing-at-point-bounds-of-list-at-point)
(defun thing-at-point-bounds-of-list-at-point ()
(let ((opoint (point))
(beg (condition-case nil
(progn (up-list -1)
(error nil))))
(condition-case nil
(if beg
(progn (forward-sexp)
(cons beg (point)))
;; Are we are at the beginning of a top-level sexp?
(let ((end (point)))
(if (>= opoint (point))
(cons opoint end))))
(error nil)))))
;; Filenames and URLs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment