aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2021-09-14 17:00:32 -0400
committerEduardo Julian2021-09-14 17:00:32 -0400
commitfbecb061fb8530ad7d04e8e3f67605e2964822e4 (patch)
treeac78c330260c5e930836b057dc21ac24f0318294
parent02b954dc0d93cd9132a6a1c758239e6a144e642b (diff)
Got lux-mode/paredit-mode to treat the semi-colon (;) like a normal character. [Part 2]
Diffstat (limited to '')
-rw-r--r--lux-mode/lux-mode.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index 3bbccce88..0be428749 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -179,16 +179,20 @@ ENDP and DELIM."
(interactive "P")
(cond ((or (consp argument) (eobp))
(delete-char +1))
+
((integerp argument)
(if (< argument 0)
(paredit-backward-delete argument)
(while (> argument 0)
(paredit-forward-delete)
(setq argument (- argument 1)))))
+
((paredit-in-string-p)
(paredit-forward-delete-in-string))
+
((paredit-in-comment-p)
(paredit-forward-delete-in-comment))
+
((let ((syn (char-syntax (char-after))))
(or (eq syn ?\( )
(eq syn ?\" )))
@@ -198,13 +202,13 @@ ENDP and DELIM."
(forward-char)
(message "Deleting spurious opening delimiter.")
(delete-char +1)))
+
((and (not (paredit-in-char-p (1- (point))))
(eq (char-syntax (char-after)) ?\) )
(eq (char-before) (matching-paren (char-after))))
(delete-char -1) ; Empty list -- delete both
(delete-char +1)) ; delimiters.
- ((eq ?\; (char-after))
- (paredit-forward-delete-comment-start))
+
((eq (char-syntax (char-after)) ?\) )
(if (paredit-handle-sexp-errors
(save-excursion (forward-char) (backward-sexp) t)
@@ -213,6 +217,7 @@ ENDP and DELIM."
(progn
(message "Deleting spurious closing delimiter.")
(delete-char +1))))
+
;; Just delete a single character, if it's not a closing
;; delimiter. (The character literal case is already handled
;; by now.)