]> git.eshelyaron.com Git - emacs.git/commitdiff
(line): Add a beginning-op function.
authorRichard M. Stallman <rms@gnu.org>
Tue, 15 Nov 1994 04:18:03 +0000 (04:18 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 15 Nov 1994 04:18:03 +0000 (04:18 +0000)
lisp/thingatpt.el

index 76caac9e3dbe5750f850d4b83bd429781caee07c..af456e3f6980ac43e5d0334924f60751f33801f3 100644 (file)
@@ -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 ()