diff options
-rw-r--r-- | paredit.el | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2282,7 +2282,7 @@ Both must be lists, strings, or atoms; error if there is a mismatch." (right-char (char-after right-point))) (let ((left-syntax (char-syntax left-char)) (right-syntax (char-syntax right-char))) - (cond ((>= left-point right-point) + (cond ((< right-point left-point) (error "Can't join a datum with itself.")) ((and (eq left-syntax ?\) ) (eq right-syntax ?\( ) @@ -2293,6 +2293,11 @@ Both must be lists, strings, or atoms; error if there is a mismatch." (delete-char 1) (goto-char left-point) (backward-delete-char 1) + ;; Heuristic kludge: (foo)(bar) => (foo bar). + (if (and (= left-point right-point) + (not (or (eq ?\s (char-syntax (char-before))) + (eq ?\s (char-syntax (char-after)))))) + (insert ?\s)) (backward-up-list) (indent-sexp)) ((and (eq left-syntax ?\" ) |