summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/tabulated-list.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-08-21 18:28:43 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-08-22 15:08:48 +0200
commitac90530a0af5c96d27e5e38e2937209a003ff1a2 (patch)
treed7ae284b1167d937223ec390d15f63d51ed5989f /lisp/emacs-lisp/tabulated-list.el
parenta7557f24831fa77d65573d5924d133387e0af590 (diff)
downloademacs-ac90530a0af5c96d27e5e38e2937209a003ff1a2.tar.gz
Prefer pos-bol and pos-eol in tabulated-list.el
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print) (tabulated-list-print-entry, tabulated-list-delete-entry) (tabulated-list-set-col, tabulated-list-previous-column): Prefer pos-bol and pos-eol.
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 9868d8c4ec0..c01f3fd4fec 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -465,7 +465,7 @@ changing `tabulated-list-sort-key'."
(let* ((elt (car entries))
(tabulated-list--near-rows
(list
- (or (tabulated-list-get-entry (point-at-bol 0)) (cadr elt))
+ (or (tabulated-list-get-entry (pos-bol 0)) (cadr elt))
(cadr elt)
(or (cadr (cadr entries)) (cadr elt))))
(id (car elt)))
@@ -519,7 +519,7 @@ of column descriptors."
(insert (make-string x ?\s)))
(let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
(or (bound-and-true-p tabulated-list--near-rows)
- (list (or (tabulated-list-get-entry (point-at-bol 0))
+ (list (or (tabulated-list-get-entry (pos-bol 0))
cols)
cols))))
(dotimes (n ncols)
@@ -611,7 +611,7 @@ This function only changes the buffer contents; it does not alter
(cols (tabulated-list-get-entry))
(inhibit-read-only t))
(when cols
- (delete-region (line-beginning-position) (1+ (line-end-position)))
+ (delete-region (pos-bol) (1+ (pos-eol)))
(list id cols))))
(defun tabulated-list-set-col (col desc &optional change-entry-data)
@@ -625,8 +625,8 @@ by setting the appropriate slot of the vector originally used to
print this entry. If `tabulated-list-entries' has a list value,
this is the vector stored within it."
(let* ((opoint (point))
- (eol (line-end-position))
- (pos (line-beginning-position))
+ (eol (pos-eol))
+ (pos (pos-bol))
(id (tabulated-list-get-id pos))
(entry (tabulated-list-get-entry pos))
(prop 'tabulated-list-column-name)
@@ -651,9 +651,9 @@ this is the vector stored within it."
(goto-char pos)
(let ((tabulated-list--near-rows
(list
- (tabulated-list-get-entry (point-at-bol 0))
+ (tabulated-list-get-entry (pos-bol 0))
entry
- (or (tabulated-list-get-entry (point-at-bol 2)) entry))))
+ (or (tabulated-list-get-entry (pos-bol 2)) entry))))
(tabulated-list-print-col col desc (current-column)))
(if change-entry-data
(aset entry col desc))
@@ -785,7 +785,7 @@ If ARG is provided, move that many columns."
(let ((prev (or (previous-single-property-change
(point) 'tabulated-list-column-name)
1)))
- (unless (< prev (line-beginning-position))
+ (unless (< prev (pos-bol))
(goto-char prev)))))
;;; The mode definition: