From 9f5c7ace45e0bd44a9d76bff06b3af0d6491239f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 15 Nov 1994 04:18:03 +0000 Subject: [PATCH] (line): Add a beginning-op function. --- lisp/thingatpt.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 76caac9e3db..af456e3f698 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -106,6 +106,14 @@ bounds-of-thing-at-point." ;;=== Special cases ======================================================= +;;--- Lines --- + +;; bolp will be false when you click on the last line in the buffer +;; and it has no final newline. + +(put 'line 'beginning-op + (function (lambda () (if (bolp) (forward-line -1) (beginning-of-line))))) + ;;--- Sexps --- (defun in-string-p () -- 2.39.5