[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit 4d3ad1e 069/224: Simplify definition of `paredit-c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit 4d3ad1e 069/224: Simplify definition of `paredit-count-sexps-forward'. |
Date: |
Sat, 7 Aug 2021 09:22:21 -0400 (EDT) |
branch: elpa/paredit
commit 4d3ad1edcbd29358ac343a0e5fbe137e4fdf90fd
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Simplify definition of `paredit-count-sexps-forward'.
Ignore-this: 76e5c8178ddc5dede762dc101e526095
Use the atrocious idiom (while (setq tmp ...) ...)...
darcs-hash:20110320184537-00fcc-ad46fdaac5b45670aa781cd61c105e1ee6ade7f5
---
paredit.el | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/paredit.el b/paredit.el
index 3c89c50..726fd09 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1865,19 +1865,11 @@ By default OPEN and CLOSE are round delimiters."
(defun paredit-count-sexps-forward ()
(save-excursion
- (let ((n 0))
- (catch 'exit
- (paredit-ignore-sexp-errors
- (while (not (eobp))
- (let ((start (point)))
- (forward-sexp)
- ;; Don't count whitespace at the end of the buffer as
- ;; another S-expression.
- (if (and (eobp)
- (save-excursion (backward-sexp)
- (or (bobp) (< (point) start))))
- (throw 'exit nil)))
- (setq n (+ n 1)))))
+ (let ((n 0) (p nil)) ;hurk
+ (paredit-ignore-sexp-errors
+ (while (setq p (scan-sexps (point) +1))
+ (goto-char p)
+ (setq n (+ n 1))))
n)))
(defun paredit-yank-pop (&optional argument)
- [nongnu] elpa/paredit 24d2ade 053/224: Bump version: 22 beta -> 22., (continued)
- [nongnu] elpa/paredit 24d2ade 053/224: Bump version: 22 beta -> 22., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 79fd488 058/224: Bump copyright year to 2011., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c655f5c 052/224: Change header and footer to conform to elisp guidelines., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2b094af 065/224: Bind M-? to `paredit-convolute-sexp'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4d6f3fc 090/224: Fix `imbalanced' -> `unbalanced' in `paredit-kill-region' docstring., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 52670b7 079/224: Fix spacing in `paredit-newline' example., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit bd439e3 083/224: Avoid trailing space when `paredit-comment-dwim' inserts code comments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2c972a9 095/224: Omit angled delimiters from the `paredit-open-...' tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2a64a4c 064/224: Eliminate confusing comment over `paredit-splice-sexp'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 48480a1 084/224: Omit needless line break in `paredit-join-sexps'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4d3ad1e 069/224: Simplify definition of `paredit-count-sexps-forward'.,
ELPA Syncer <=
- [nongnu] elpa/paredit 8a2d457 093/224: Reindent in `paredit-open-round' &c. like `paredit-wrap-round' &c., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 980a4f4 091/224: Add rudimentary and preliminary test suite., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 33f9c67 100/224: Use `error', not `message', to report test failures in test.el., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 79e7555 086/224: Be more careful about deleting comment starts & ends., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 121a8b4 104/224: Make backslash escape prompt less confusing., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 41bbc20 078/224: Make `paredit-comment-dwim' code comment example work in isolation., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 5e210b2 087/224: Fix bug in recent change to more carefully delete comment ends., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit d9ecc6d 094/224: Handle scan errors in `paredit-scan-sexps-hack'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 6c14694 113/224: Use `call-interactively' rather than `funcall' in `paredit-test'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 9cac6fa 106/224: Specify that paredit should work in XEmacs 21.5.28 or later., ELPA Syncer, 2021/08/07