[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 5718f13e09: Replace `beginning-of-defun` fn
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 5718f13e09: Replace `beginning-of-defun` fn |
Date: |
Sat, 9 Sep 2023 00:59:01 -0400 (EDT) |
branch: elpa/cider
commit 5718f13e09093466441d5fcbd308397c43a880d8
Author: p4v4n <pavan.mantha99@gmail.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Replace `beginning-of-defun` fn
---
CHANGELOG.md | 1 +
cider-completion.el | 2 +-
cider-debug.el | 2 +-
cider-eval.el | 2 +-
cider-mode.el | 2 +-
cider-repl.el | 2 +-
cider-util.el | 4 ++--
7 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c44834ac44..6c294d2b57 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,7 @@
### Changes
+- Improve support for multiple forms in the same line by replacing
`beginning-of-defun` fn.
- [#3390](https://github.com/clojure-emacs/cider/issues/3390): Enhance
`cider-connect` to show all nREPLs available ports, instead of only Leiningen
ones.
- [#3408](https://github.com/clojure-emacs/cider/issues/3408):
`cider-connect`: check `.nrepl-port`-like files for liveness, hiding them if
they don't reflect an active port.
- Introduce `cider-stacktrace-navigate-to-other-window` defcustom.
diff --git a/cider-completion.el b/cider-completion.el
index 20b75e46a6..944c6e9721 100644
--- a/cider-completion.el
+++ b/cider-completion.el
@@ -140,7 +140,7 @@ form, with symbol at point replaced by __prefix__."
(let* ((pref-end (point))
(pref-start (cider-completion-symbol-start-pos))
(context (cider-defun-at-point))
- (_ (beginning-of-defun))
+ (_ (beginning-of-defun-raw))
(expr-start (point)))
(concat (when pref-start (substring context 0 (- pref-start
expr-start)))
"__prefix__"
diff --git a/cider-debug.el b/cider-debug.el
index ec67a87acb..aa6000ed72 100644
--- a/cider-debug.el
+++ b/cider-debug.el
@@ -762,7 +762,7 @@ The boolean value of FORCE will be sent in the reply."
(progn ;; Get to the proper line & column in the file
(forward-line (1- (- line (line-number-at-pos))))
(move-to-column column))
- (beginning-of-defun))
+ (beginning-of-defun-raw))
;; Is HERE inside the sexp being debugged?
(when (or (< here (point))
(save-excursion
diff --git a/cider-eval.el b/cider-eval.el
index 3f16f67bb9..69f1e68fcc 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -1362,7 +1362,7 @@ buffer. It constructs an expression to eval in the
following manner:
- It balances this bit of code by closing all open expressions;
- It evaluates the resulting code using `cider-interactive-eval'."
(interactive "P")
- (let* ((beg-of-defun (save-excursion (beginning-of-defun) (point)))
+ (let* ((beg-of-defun (save-excursion (beginning-of-defun-raw) (point)))
(code (buffer-substring-no-properties beg-of-defun (point)))
(code (cider--insert-closing-delimiters code)))
(cider-interactive-eval code
diff --git a/cider-mode.el b/cider-mode.el
index 9c8a389852..94e3be2534 100644
--- a/cider-mode.el
+++ b/cider-mode.el
@@ -952,7 +952,7 @@ before point."
;; If the inside of a `ns' form changed, reparse it from the start.
(when (and (not (bobp))
(get-text-property (1- (point)) 'cider-block-dynamic-font-lock))
- (ignore-errors (beginning-of-defun)))
+ (ignore-errors (beginning-of-defun-raw)))
(save-excursion
;; Move up until we reach a sexp that encloses the entire region (or
;; a top-level sexp), and set that as the new BEG.
diff --git a/cider-repl.el b/cider-repl.el
index dd28e54ee9..b2f637b1ee 100644
--- a/cider-repl.el
+++ b/cider-repl.el
@@ -540,7 +540,7 @@ If given a negative value of ARG, move to the beginning of
defun."
(if (and (not (cider-repl--at-prompt-start-p))
(cider-repl--in-input-area-p))
(goto-char cider-repl-input-start-mark)
- (beginning-of-defun)))
+ (beginning-of-defun-raw)))
(defun cider-repl-end-of-defun ()
"Move to end of defun."
diff --git a/cider-util.el b/cider-util.el
index 4ae7657c48..ddabbb728c 100644
--- a/cider-util.el
+++ b/cider-util.el
@@ -71,12 +71,12 @@ Setting this to nil removes the fontification restriction."
(defun cider-in-string-p ()
"Return non-nil if point is in a string."
- (let ((beg (save-excursion (beginning-of-defun) (point))))
+ (let ((beg (save-excursion (beginning-of-defun-raw) (point))))
(nth 3 (parse-partial-sexp beg (point)))))
(defun cider-in-comment-p ()
"Return non-nil if point is in a comment."
- (let ((beg (save-excursion (beginning-of-defun) (point))))
+ (let ((beg (save-excursion (beginning-of-defun-raw) (point))))
(nth 4 (parse-partial-sexp beg (point)))))
(defun cider--tooling-file-p (file-name)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/cider 5718f13e09: Replace `beginning-of-defun` fn,
ELPA Syncer <=