[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16677: 24.3.50; Wrong type argument: char-or-string-p, 67108923
From: |
Juanma Barranquero |
Subject: |
bug#16677: 24.3.50; Wrong type argument: char-or-string-p, 67108923 |
Date: |
Fri, 7 Feb 2014 04:55:04 +0100 |
On Fri, Feb 7, 2014 at 3:57 AM, Drew Adams <drew.adams@oracle.com> wrote:
> Emacs 23 got it right, but it did not make the extra effort to give the
> user an error message that s?he deserves: something more helpful than a
> low-level barf message (even if that message might be comprehensible to
> a knowledgable Emacs user).
It's not just an UI issue. If you type that in a buffer with binary
overwrite mode enabled, quoted-insert will delete a char and then
barf.
So I'd suggest this:
=== modified file 'lisp/simple.el'
--- lisp/simple.el 2014-02-07 03:22:34 +0000
+++ lisp/simple.el 2014-02-07 03:54:27 +0000
@@ -739,4 +739,7 @@
;; (<= char ?\377))
;; (setq char (unibyte-char-to-multibyte char)))
+ (unless (characterp char)
+ (user-error "%s is not a character"
+ (help-key-description (vector char) nil)))
(if (> arg 0)
(if (eq overwrite-mode 'overwrite-mode-binary)