branch: elpa/emacsql
commit 18b40213fdc4cab2f836f5dc3f42b12f3c27af66
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
No longer use obsolete generalized variable `point'
Made obsolete in 29.1 / 48aacbf292fbe8d4be7761f83bf87de93497df27.
---
emacsql-compiler.el | 6 +++---
emacsql-mysql.el | 4 ++--
emacsql-psql.el | 4 ++--
emacsql-sqlite.el | 2 +-
emacsql.el | 8 ++++----
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index c5a9357c31..927a8de330 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -59,12 +59,12 @@
"Single-quote (scalar) STRING for use in a SQL expression."
(with-temp-buffer
(insert string)
- (setf (point) (point-min))
+ (goto-char (point-min))
(while (re-search-forward "'" nil t)
(replace-match "''"))
- (setf (point) (point-min))
+ (goto-char (point-min))
(insert "'")
- (setf (point) (point-max))
+ (goto-char (point-max))
(insert "'")
(buffer-string)))
diff --git a/emacsql-mysql.el b/emacsql-mysql.el
index 211dccf4e0..9927b561ac 100644
--- a/emacsql-mysql.el
+++ b/emacsql-mysql.el
@@ -112,13 +112,13 @@
http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html")
(let ((length (length emacsql-mysql-sentinel)))
(with-current-buffer (emacsql-buffer connection)
(and (>= (buffer-size) length)
- (progn (setf (point) (- (point-max) length))
+ (progn (goto-char (- (point-max) length))
(looking-at emacsql-mysql-sentinel))))))
(cl-defmethod emacsql-parse ((connection emacsql-mysql-connection))
(with-current-buffer (emacsql-buffer connection)
(let ((standard-input (current-buffer)))
- (setf (point) (point-min))
+ (goto-char (point-min))
(when (looking-at "ERROR")
(search-forward ": ")
(signal 'emacsql-error
diff --git a/emacsql-psql.el b/emacsql-psql.el
index e544d7e28a..14a74aed8a 100644
--- a/emacsql-psql.el
+++ b/emacsql-psql.el
@@ -126,7 +126,7 @@
http://www.postgresql.org/docs/7.3/static/sql-keywords-appendix.html")
(cl-defmethod emacsql-check-error ((connection emacsql-psql-connection))
(with-current-buffer (emacsql-buffer connection)
(let ((case-fold-search t))
- (setf (point) (point-min))
+ (goto-char (point-min))
(when (looking-at "error:")
(let* ((beg (line-beginning-position))
(end (line-end-position)))
@@ -136,7 +136,7 @@
http://www.postgresql.org/docs/7.3/static/sql-keywords-appendix.html")
(emacsql-check-error connection)
(with-current-buffer (emacsql-buffer connection)
(let ((standard-input (current-buffer)))
- (setf (point) (point-min))
+ (goto-char (point-min))
(cl-loop until (looking-at "]")
collect (read) into row
when (looking-at "\n")
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index 269b44e3b7..7fad320ef4 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -154,7 +154,7 @@ buffer. This is for debugging purposes."
(case-fold-search nil))
(with-temp-buffer
(insert-file-contents makefile)
- (setf (point) (point-min))
+ (goto-char (point-min))
(cl-loop while (re-search-forward "-D[A-Z0-9_=]+" nil :no-error)
collect (match-string 0)))))
diff --git a/emacsql.el b/emacsql.el
index 7b22a25d6a..c35c6782cd 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -136,7 +136,7 @@ MESSAGE should not have a newline on the end."
(unless (buffer-live-p buffer)
(setq buffer (emacsql-enable-debugging connection)))
(with-current-buffer buffer
- (setf (point) (point-max))
+ (goto-char (point-max))
(princ (concat message "\n") buffer)))))
;;; Sending and receiving
@@ -215,7 +215,7 @@ specific error conditions."
(cl-defmethod emacsql-parse ((connection emacsql-protocol-mixin))
"Parse well-formed output into an s-expression."
(with-current-buffer (emacsql-buffer connection)
- (setf (point) (point-min))
+ (goto-char (point-min))
(let* ((standard-input (current-buffer))
(value (read)))
(if (eql value 'error)
@@ -337,7 +337,7 @@ Each column must be a plain symbol, no expressions allowed
here."
(defun emacsql--indent ()
"Indent and wrap the SQL expression in the current buffer."
(save-excursion
- (setf (point) (point-min))
+ (goto-char (point-min))
(let ((case-fold-search nil))
(while (search-forward-regexp " [A-Z]+" nil :no-error)
(when (> (current-column) (* fill-column 0.8))
@@ -405,7 +405,7 @@ A prefix argument causes the SQL to be printed into the
current buffer."
(beginning-of-defun)
(let ((containing-sexp (elt (parse-partial-sexp (point) start) 1)))
(when containing-sexp
- (setf (point) containing-sexp)
+ (goto-char containing-sexp)
(looking-at "\\["))))))
(defadvice calculate-lisp-indent (around emacsql-vector-indent disable)