[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 83d4968 09/16: Improves sexp object/movement
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 83d4968 09/16: Improves sexp object/movement |
Date: |
Mon, 4 Feb 2019 07:46:29 -0500 (EST) |
branch: externals/objed
commit 83d49686701c86c7799de7c374c7b81a7ac2d320
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Improves sexp object/movement
---
objed-objects.el | 13 ++++++++-----
objed.el | 12 ++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 5a0c5bf..6f2184d 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1500,9 +1500,7 @@ comments."
(defun objed--at-sexp-p ()
- "Return non-nil if point at strutured expression.
-
-Ignores simple structured expressions like words or symbols."
+ "Return sexp object if point at strutured expression."
(let ((opos (point))
(real-this-command 'forward-sexp))
(save-excursion
@@ -1515,6 +1513,8 @@ Ignores simple structured expressions like words or
symbols."
(forward-sexp (- arg)))))))
(let ((zigp nil))
(when (or (and (not (eobp))
+ (or (eq (char-syntax (char-before)) ?\s)
+ (not (eq (char-syntax (char-after)) ?\")))
(save-excursion
(eq (point) (progn (setq zigp (zigzag 1))
(point)))))
@@ -1561,8 +1561,11 @@ Ignores simple structured expressions like words or
symbols."
(cons beg (point)))))))
:try-next
(or (ignore-errors
- (forward-sexp 1)
- (forward-sexp -1) t)
+ (forward-sexp 1)
+ (forward-sexp -1) t)
+ (ignore-errors
+ (up-list 1)
+ t)
(ignore-errors
(forward-word 1)
(forward-sexp -1)
diff --git a/objed.el b/objed.el
index 20e45d6..47647d7 100644
--- a/objed.el
+++ b/objed.el
@@ -910,14 +910,22 @@ Use `objed-define-dispatch' to define a dispatch
command.")
(defun objed--forward-sexp ()
(interactive)
(while (and (not (eobp))
- (not (ignore-errors (call-interactively 'forward-sexp) t)))
+ (or (and (not (bobp))
+ (not (eq (char-syntax (char-before)) ?\s))
+ (eq (char-syntax (char-after)) ?\"))
+ (not (ignore-errors
+ (call-interactively 'forward-sexp)
+ t))))
(forward-char 1)))
(defun objed--backward-sexp ()
(interactive)
(while (and (not (bobp))
- (not (ignore-errors (call-interactively 'backward-sexp) t)))
+ (or (eq (char-syntax (char-before)) ?\")
+ (not (ignore-errors
+ (call-interactively 'backward-sexp)
+ t))))
(forward-char -1)))
- [elpa] externals/objed b98e4be 02/16: Add melpa stable badge, (continued)
- [elpa] externals/objed b98e4be 02/16: Add melpa stable badge, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed e809d3f 03/16: Add Elpa badge, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 3a26da6 04/16: Change elpa badge, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 4c4ab09 06/16: Add objed-activate example, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed d2fdbe0 05/16: Switch badge order to elpa, melpa stable, melpa, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed a6cebcc 07/16: Mention actual command names to move to prev/next identifier, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed c54c8b3 16/16: Version bump, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed e427899 12/16: Get context object when acting on sexp object (toggle state etc.), Clemens Radermacher, 2019/02/04
- [elpa] externals/objed f28ee01 11/16: Improve sexp object/movement again, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 1652f3b 10/16: Add two new entry commands (for object-at-point), Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 83d4968 09/16: Improves sexp object/movement,
Clemens Radermacher <=
- [elpa] externals/objed 54a02c0 13/16: Toggle extend on repeat, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 589d763 14/16: Update desciptions, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 0bfdb3c 15/16: Changing key binding policy, Clemens Radermacher, 2019/02/04
- [elpa] externals/objed 4527af4 08/16: Replace character based movement with sexp movement commands, Clemens Radermacher, 2019/02/04