changeset 9931:23e429e3fb18

(line): Add a beginning-op function.
author Richard M. Stallman <rms@gnu.org>
date Tue, 15 Nov 1994 04:18:03 +0000
parents 3b0788d087b6
children c981c199462f
files lisp/thingatpt.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/thingatpt.el	Tue Nov 15 03:38:23 1994 +0000
+++ b/lisp/thingatpt.el	Tue Nov 15 04:18:03 1994 +0000
@@ -106,6 +106,14 @@
 
 ;;=== 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 ()