summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-03-23 06:12:13 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-03-23 06:12:13 +0000
commit121a8b4dac5eb2f398ccfdc47008606ca91b3733 (patch)
treeec29799d51b14687412dd90d4c06dbebbc0b819d
parent2a94a48d75dffac1f23d51c5a14419a12fe13e9d (diff)
Make backslash escape prompt less confusing.
Ignore-this: 6d25fd1fad7e584d421b9e57fa8ab69 At least one user, upon seeing Emacs say `Escaping character...', checked top for its CPU usage! Thanks, elly. darcs-hash:20110323061213-00fcc-63e99f496e8afd219d3c5ea88f6499abcd4ade39
-rw-r--r--paredit.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/paredit.el b/paredit.el
index 0b3a72c..3d1ed25 100644
--- a/paredit.el
+++ b/paredit.el
@@ -313,9 +313,9 @@ Paredit behaves badly if parentheses are unbalanced, so exercise
,(concat "(foo \"|(bar #\\\\x \\\"baz \\\\"
"\\\\ quux\\\")\" zot)")))
("\\" paredit-backslash
- ("(string #|)\n ; Escaping character... (x)"
+ ("(string #|)\n ; Character to escape: x"
"(string #\\x|)")
- ("\"foo|bar\"\n ; Escaping character... (\")"
+ ("\"foo|bar\"\n ; Character to escape: \""
"\"foo\\\"|bar\""))
(";" paredit-semicolon
("|(frob grovel)"
@@ -970,11 +970,14 @@ If not in a string, act as `paredit-doublequote'; if no prefix argument
;; -- then delete the backslash to avoid a dangling escape.
(let ((delete-p t))
(unwind-protect
- (let ((char (read-char "Escaping character...")))
+ (let ((char (read-char "Character to escape: ")))
(if (not (eq char ?\^?))
- (progn (insert char) (setq delete-p nil))))
+ (progn (message "Character to escape: %c" char)
+ (insert char)
+ (setq delete-p nil))))
(if delete-p
- (backward-delete-char 1))))))
+ (progn (message "Deleting escape.")
+ (backward-delete-char 1)))))))
(defun paredit-newline ()
"Insert a newline and indent it.