summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/isearch.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9a4fb86b2b0..1dd746b2b18 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1763,9 +1763,10 @@ since they have special meaning in a regexp."
;; Portability functions to support various Emacs versions.
(defun isearch-text-char-description (c)
- (if (and (integerp c) (or (< c ?\ ) (= c ?\^?)))
- (text-char-description c)
- (char-to-string c)))
+ (cond
+ ((< c ?\ ) (format "^%c" (+ c 64)))
+ ((= c ?\^?) "^?")
+ (t (char-to-string c))))
;; General function to unread characters or events.
;; Also insert them in a keyboard macro being defined.