aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/thingatpt.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 6268d96c526..58dc08649de 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -437,15 +437,22 @@ Signal an error if the entire string was not used."
437 (if (or (not pred) (funcall pred sexp)) sexp))) 437 (if (or (not pred) (funcall pred sexp)) sexp)))
438 438
439;;;###autoload 439;;;###autoload
440(defun sexp-at-point () (form-at-point 'sexp)) 440(defun sexp-at-point ()
441 "Return the sexp at point, or nil if none is found."
442 (form-at-point 'sexp))
441;;;###autoload 443;;;###autoload
442(defun symbol-at-point () 444(defun symbol-at-point ()
445 "Return the symbol at point, or nil if none is found."
443 (let ((thing (thing-at-point 'symbol))) 446 (let ((thing (thing-at-point 'symbol)))
444 (if thing (intern thing)))) 447 (if thing (intern thing))))
445;;;###autoload 448;;;###autoload
446(defun number-at-point () (form-at-point 'sexp 'numberp)) 449(defun number-at-point ()
450 "Return the number at point, or nil if none is found."
451 (form-at-point 'sexp 'numberp))
447;;;###autoload 452;;;###autoload
448(defun list-at-point () (form-at-point 'list 'listp)) 453(defun list-at-point ()
454 "Return the Lisp list at point, or nil if none is found."
455 (form-at-point 'list 'listp))
449 456
450;; arch-tag: bb65a163-dae2-4055-aedc-fe11f497f698 457;; arch-tag: bb65a163-dae2-4055-aedc-fe11f497f698
451;;; thingatpt.el ends here 458;;; thingatpt.el ends here