[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/emms c68448c497 3/4: Depreciate point-at-*.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/emms c68448c497 3/4: Depreciate point-at-*. |
Date: |
Fri, 18 Aug 2023 12:58:23 -0400 (EDT) |
branch: externals/emms
commit c68448c497b75d9362a9f3ab87765984df8f5d3a
Author: Yoni Rabkin <yrk@gnu.org>
Commit: Yoni Rabkin <yrk@gnu.org>
Depreciate point-at-*.
---
emms-browser.el | 16 ++++++++--------
emms-librefm-scrobbler.el | 20 ++++++++++----------
emms-librefm-stream.el | 4 ++--
emms-metaplaylist-mode.el | 14 +++++++-------
emms-playlist-mode.el | 8 ++++----
5 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/emms-browser.el b/emms-browser.el
index e0dcc41ac7..cefa91b645 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -936,7 +936,7 @@ Uses `emms-browser-alpha-sort-function'."
(defun emms-browser-bdata-at-point ()
"Return the bdata object at point.
Includes information at point (such as album name), and metadata."
- (get-text-property (point-at-bol)
+ (get-text-property (line-beginning-position)
'emms-browser-bdata))
(defun emms-browser-data-at-point ()
@@ -1063,14 +1063,14 @@ If there is no more subitems to expand, collapse the
current node."
Stops at the next line at the same level, or EOF."
(when (emms-browser-subitems-visible)
(let ((current-level (emms-browser-level-at-point))
- (next-line (point-at-bol 2)))
+ (next-line (line-beginning-position 2)))
(emms-with-inhibit-read-only-t
(delete-region next-line
(save-excursion
(while
(emms-browser-find-entry-more-than-level
current-level))
- (point-at-bol 2)))))))
+ (line-beginning-position 2)))))))
;; --------------------------------------------------
;; Dealing with the playlist (queuing songs, etc)
@@ -1161,8 +1161,8 @@ After expanding, jump to the currently marked entry."
(save-excursion
(emms-browser-find-top-level)
(emms-with-inhibit-read-only-t
- (add-text-properties (point-at-bol)
- (point-at-eol)
+ (add-text-properties (line-beginning-position)
+ (line-end-position)
(list 'emms-browser-mark t)))))
(defun emms-browser-pop-mark ()
@@ -1174,8 +1174,8 @@ After expanding, jump to the currently marked entry."
(progn
(goto-char pos)
(emms-with-inhibit-read-only-t
- (remove-text-properties (point-at-bol)
- (point-at-eol)
+ (remove-text-properties (line-beginning-position)
+ (line-end-position)
(list 'emms-browser-mark))))
(message "No mark saved!"))))
@@ -1207,7 +1207,7 @@ Return point. If at level one, return the current point."
(when (emms-browser-subitems-visible)
(emms-browser-kill-subitems))
(emms-with-inhibit-read-only-t
- (goto-char (point-at-bol))
+ (goto-char (line-beginning-position))
(kill-line 1))
(unless (eq (emms-browser-bdata-level child-bdata) 1)
;; remove the node from the parent, and recurse
diff --git a/emms-librefm-scrobbler.el b/emms-librefm-scrobbler.el
index 3b97f00fb3..ebb6aed544 100644
--- a/emms-librefm-scrobbler.el
+++ b/emms-librefm-scrobbler.el
@@ -151,27 +151,27 @@ TOKEN is :user of :secret."
(error "response not a buffer"))
(with-current-buffer resbuf
(goto-char (point-min))
- (when (not (re-search-forward "^.*200 OK$" (point-at-eol) t))
+ (when (not (re-search-forward "^.*200 OK$" (line-end-position) t))
(error "bad HTTP server response"))
;; go to the start of the FM response
(when (not (re-search-forward "\n\n" (point-max) t))
(error "bad FM server response"))
- (let ((status (buffer-substring (point-at-bol)
- (point-at-eol))))
+ (let ((status (buffer-substring (line-beginning-position)
+ (line-end-position))))
(when (not (string= status "OK"))
(error "FM server returned: %s" status))
(let (session-id
now-playing-url
submission-url)
(forward-line 1)
- (setq session-id (buffer-substring (point-at-bol)
- (point-at-eol)))
+ (setq session-id (buffer-substring (line-beginning-position)
+ (line-end-position)))
(forward-line 1)
- (setq now-playing-url (buffer-substring (point-at-bol)
- (point-at-eol)))
+ (setq now-playing-url (buffer-substring (line-beginning-position)
+ (line-end-position)))
(forward-line 1)
- (setq submission-url (buffer-substring (point-at-bol)
- (point-at-eol)))
+ (setq submission-url (buffer-substring (line-beginning-position)
+ (line-end-position)))
(when (or (= 0 (length session-id))
(= 0 (length now-playing-url))
(= 0 (length submission-url)))
@@ -241,7 +241,7 @@ TOKEN is :user of :secret."
(goto-char (point-min))
(re-search-forward "\n\n")
(buffer-substring-no-properties
- (point-at-bol) (point-at-eol))))
+ (line-beginning-position) (line-end-position))))
(defun emms-librefm-scrobbler-make-async-submission-call (track rating)
"Make asynchronous submission call."
diff --git a/emms-librefm-stream.el b/emms-librefm-stream.el
index bfab2af672..f0ae0e54b4 100644
--- a/emms-librefm-stream.el
+++ b/emms-librefm-stream.el
@@ -74,7 +74,7 @@
This function must be called inside the response buffer. Leaves
point after the HTTP headers."
(goto-char (point-min))
- (when (not (re-search-forward "^.*200 OK$" (point-at-eol) t))
+ (when (not (re-search-forward "^.*200 OK$" (line-end-position) t))
(error "bad HTTP server response"))
;; go to the start of the FM response
(when (not (re-search-forward "\n\n" (point-max) t))
@@ -355,7 +355,7 @@ point after the HTTP headers."
(point-min)))
(when (and (eq (current-buffer)
emms-librefm-stream-playlist-buffer)
- (not (next-single-property-change (point-at-eol)
+ (not (next-single-property-change (line-end-position)
'emms-track)))
(emms-librefm-stream-queue))))
diff --git a/emms-metaplaylist-mode.el b/emms-metaplaylist-mode.el
index 2b9c1096b5..d980888aac 100644
--- a/emms-metaplaylist-mode.el
+++ b/emms-metaplaylist-mode.el
@@ -98,8 +98,8 @@
"Switch to the buffer at point."
(interactive)
(let ((buffer (get-buffer
- (buffer-substring (point-at-bol)
- (point-at-eol)))))
+ (buffer-substring (line-beginning-position)
+ (line-end-position)))))
(emms-playlist-set-playlist-buffer buffer)
(switch-to-buffer buffer)))
@@ -110,7 +110,7 @@
(let ((inhibit-read-only t))
(insert (buffer-name buf))
(add-text-properties
- (point-at-bol) (point-at-eol)
+ (line-beginning-position) (line-end-position)
(list 'face
(if (eq buf emms-playlist-buffer)
'emms-metaplaylist-mode-current-face
@@ -141,7 +141,7 @@
(point-max) t)))
(when (not p) (error "cannot not find the current playlist buffer"))
(goto-char p)
- (goto-char (point-at-bol)))))
+ (goto-char (line-beginning-position)))))
(defun emms-metaplaylist-mode-create ()
"Create the meta-playlist buffer."
@@ -174,8 +174,8 @@
"Kill the buffer at point"
(interactive)
(let ((buffer (get-buffer
- (buffer-substring (point-at-bol)
- (point-at-eol)))))
+ (buffer-substring (line-beginning-position)
+ (line-end-position)))))
(when (not buffer)
(error "can't find buffer at point"))
(if (y-or-n-p (format "kill playlist buffer \"%s\"?"
@@ -204,7 +204,7 @@
"Set the buffer at point to be the active playlist."
(interactive)
(emms-playlist-set-playlist-buffer
- (get-buffer (buffer-substring (point-at-bol) (point-at-eol))))
+ (get-buffer (buffer-substring (line-beginning-position)
(line-end-position))))
(emms-metaplaylist-mode-update))
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el
index 9604c508fc..8ecbabe914 100644
--- a/emms-playlist-mode.el
+++ b/emms-playlist-mode.el
@@ -358,7 +358,7 @@ With a prefix arg, open the `dired' buffer in OTHER-WINDOW."
(delete-overlay emms-playlist-mode-selected-overlay)
(setq emms-playlist-mode-selected-overlay nil))))
(let ((kill-whole-line emms-playlist-mode-kill-whole-line-p))
- (goto-char (point-at-bol))
+ (goto-char (line-beginning-position))
(kill-line)))))
;; C-w
@@ -380,8 +380,8 @@ With a prefix arg, open the `dired' buffer in OTHER-WINDOW."
(defun emms-playlist-mode-correct-previous-yank ()
"Fix the previous yank if needed."
- (when (and (< (point-at-bol) (point))
- (< (point) (point-at-eol)))
+ (when (and (< (line-beginning-position) (point))
+ (< (point) (line-end-position)))
(newline)))
;; C-y
@@ -389,7 +389,7 @@ With a prefix arg, open the `dired' buffer in OTHER-WINDOW."
"Yank into the playlist buffer."
(interactive)
(emms-with-inhibit-read-only-t
- (goto-char (point-at-bol))
+ (goto-char (line-beginning-position))
(yank)
(emms-playlist-mode-correct-previous-yank)))