1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-08 23:40:24 -08:00

Make point-at-eol and point-at-bol obsolete

* lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat
aliases obsolete in favor of `pos-bol'/'line-beginning-position' or
'pos-eol'/'line-end-position'.  Update callers.
Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
This commit is contained in:
Stefan Kangas 2022-08-23 04:54:57 +02:00
parent e425b7d231
commit b7e867b841
134 changed files with 586 additions and 550 deletions

View file

@ -591,7 +591,7 @@ content of the sexp."
(begin (previous-single-property-change end 'backtrace-form
nil (point-min))))
(unless tag
(when (or (= end (point-max)) (> end (point-at-eol)))
(when (or (= end (point-max)) (> end (line-end-position)))
(user-error "No form here to reformat"))
(goto-char end)
(setq pos end

View file

@ -1235,7 +1235,8 @@ Order is by depth-first search."
(let (new-l new-c)
(save-excursion
(goto-char offset)
(setq new-l (1+ (count-lines (point-min) (point-at-bol)))
(setq new-l (1+ (count-lines (point-min)
(line-beginning-position)))
new-c (1+ (current-column)))
(format "%d:%d:" new-l new-c))))
""))

View file

@ -526,9 +526,9 @@ cons cells of the form (NAME . NUM). See `sort' for more details."
(defun chart-zap-chars (n)
"Zap up to N chars without deleting EOLs."
(if (not (eobp))
(if (< n (- (point-at-eol) (point)))
(if (< n (- (line-end-position) (point)))
(delete-char n)
(delete-region (point) (point-at-eol)))))
(delete-region (point) (line-end-position)))))
(defun chart-display-label (label dir zone start end &optional face)
"Display LABEL in direction DIR in column/row ZONE between START and END.