[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit 0011090 066/224: Fix bounds checking in `paredit-f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit 0011090 066/224: Fix bounds checking in `paredit-find-next-string-start'. |
Date: |
Sat, 7 Aug 2021 09:22:20 -0400 (EDT) |
branch: elpa/paredit
commit 00110906360df491b3dc925ba11f156a98ee59d7
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Fix bounds checking in `paredit-find-next-string-start'.
Ignore-this: 4bf62fadcc0f90e2c582311eff1355d8
Check for the beginning/end of buffer to avoid infinite loops there.
Order points right to fix (|"foo" ()) ==C-M-d==> ("foo" (|)).
Thanks to Eitan Postavsky for the report.
darcs-hash:20110320183422-00fcc-8fe38d45bdd4e4e94925d56f537fd079111514f6
---
paredit.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/paredit.el b/paredit.el
index 22927bf..23acb5f 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1778,13 +1778,15 @@ With a prefix argument N, encompass all N S-expressions
forward."
'paredit-up/down)))))
(defun paredit-find-next-string-start (horizontal-direction limit)
- (let ((next-char (if (< 0 horizontal-direction) 'char-after 'char-before))
- (pastp (if (< 0 horizontal-direction) '< '>)))
+ (let ((buffer-limit-p (if (< 0 horizontal-direction) 'eobp 'bobp))
+ (next-char (if (< 0 horizontal-direction) 'char-after 'char-before))
+ (pastp (if (< 0 horizontal-direction) '> '<)))
(paredit-handle-sexp-errors
(save-excursion
(catch 'exit
(while t
- (if (and limit (funcall pastp (point) limit))
+ (if (or (funcall buffer-limit-p)
+ (and limit (funcall pastp (point) limit)))
(throw 'exit nil))
(forward-sexp horizontal-direction)
(save-excursion
- [nongnu] elpa/paredit 04e6f50 035/224: Put space between closing delimiters and opening double quotes., (continued)
- [nongnu] elpa/paredit 04e6f50 035/224: Put space between closing delimiters and opening double quotes., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 70d40b5 040/224: Refine scope of reindentation after raise, splice, and insert-comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 896c165 039/224: Implement variable `paredit-space-for-delimiter-predicates'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e23adec 036/224: Omit vestigial debug message in `paredit-backward-slurp-into-string'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c0a9160 041/224: Make `paredit-newline' keep invalid structure inside comments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 05b2cad 043/224: Generalize `paredit-kill' to work inside any string-like object., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e380e42 048/224: Implement `paredit-{for, back}ward-{up, down}'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 3ce96a4 050/224: Fix format arguments in `paredit-check-region-state-comment'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 73c481a 061/224: Simplify and clarify implementation of `paredit-backslash'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b51f220 055/224: In `paredit-newline', ignore parse errors during `indent-sexp'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0011090 066/224: Fix bounds checking in `paredit-find-next-string-start'.,
ELPA Syncer <=
- [nongnu] elpa/paredit bd0e5ba 072/224: Don't mask errors during `buffer-string' in `paredit-unescape-string'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b7f234a 067/224: Preserve column in `paredit-reindent-defun'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2a94a48 103/224: Set `indent-tabs-mode' and `current-column' in `paredit-test'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e06ab40 063/224: Spell `paredit-recenter-on-sexp' to match convention in Emacs., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0a7619c 089/224: Fix `imbalanced' -> `unbalanced' in `paredit-kill-ring-save' docstring., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 9faf474 073/224: Use `scan-sexps' for noninteractive `check-parens'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a79aa2c 082/224: Fix end-of-line and end-of-buffer corner cases of `paredit-semicolon'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 8a85899 098/224: Omit vestigial debugging message from `paredit-test' in test.el., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 678d843 107/224: Make the exhortation about bug reports slightly less harsh., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit f5e7959 081/224: Show point in `paredit-splice-sexp-killing-forward' example., ELPA Syncer, 2021/08/07