comparison lisp/thingatpt.el @ 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 c0cc87942423
children e961f9a213a7
comparison
equal deleted inserted replaced
9930:3b0788d087b6 9931:23e429e3fb18
104 (or bounds (error "No %s here" THING)) 104 (or bounds (error "No %s here" THING))
105 (goto-char (cdr bounds)))) 105 (goto-char (cdr bounds))))
106 106
107 ;;=== Special cases ======================================================= 107 ;;=== Special cases =======================================================
108 108
109 ;;--- Lines ---
110
111 ;; bolp will be false when you click on the last line in the buffer
112 ;; and it has no final newline.
113
114 (put 'line 'beginning-op
115 (function (lambda () (if (bolp) (forward-line -1) (beginning-of-line)))))
116
109 ;;--- Sexps --- 117 ;;--- Sexps ---
110 118
111 (defun in-string-p () 119 (defun in-string-p ()
112 (let ((orig (point))) 120 (let ((orig (point)))
113 (save-excursion 121 (save-excursion