bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4039: marked as done (C-x 8 RET with prefix arg doesn't repeat chara


From: Emacs bug Tracking System
Subject: bug#4039: marked as done (C-x 8 RET with prefix arg doesn't repeat character)
Date: Wed, 12 Aug 2009 20:50:04 +0000

Your message dated Wed, 12 Aug 2009 23:45:10 +0300
with message-id <87d470lq21.fsf@mail.jurta.org>
and subject line Re: bug#4039: C-x 8 RET with prefix arg doesn't repeat 
character
has caused the Emacs bug report #4039,
regarding C-x 8 RET with prefix arg doesn't repeat character
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4039: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4039
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
--- Begin Message --- Subject: C-x 8 RET with prefix arg doesn't repeat character Date: Tue, 04 Aug 2009 22:51:47 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
Typing

  C-u 5 C-x 8 ' a

is supposed to insert 5 characters of á in a row
(modulo the reported bug#4037).

However, typing

  C-u 5 C-x 8 RET E1 RET

inserts just 1 character (`E1' is the code point of á).

I propose to fix `ucs-insert' to accept the same arguments
as `insert-char', i.e. `character', `count' and `inherit':

Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.362
diff -c -r1.362 mule-cmds.el
*** lisp/international/mule-cmds.el     15 Jul 2009 12:28:09 -0000      1.362
--- lisp/international/mule-cmds.el     4 Aug 2009 19:50:42 -0000
***************
*** 2941,2959 ****
       (t
        (cdr (assoc-string input (ucs-names) t))))))
  
! (defun ucs-insert (arg)
!   "Insert a character of the given Unicode code point.
  Interactively, prompts for a Unicode character name or a hex number
! using `read-char-by-name'."
!   (interactive (list (read-char-by-name "Unicode (name or hex): ")))
!   (if (stringp arg)
!       (setq arg (string-to-number arg 16)))
    (cond
!    ((not (integerp arg))
!     (error "Not a Unicode character code: %S" arg))
!    ((or (< arg 0) (> arg #x10FFFF))
!     (error "Not a Unicode character code: 0x%X" arg)))
!   (insert-and-inherit arg))
  
  (define-key ctl-x-map "8\r" 'ucs-insert)
  
--- 2941,2968 ----
       (t
        (cdr (assoc-string input (ucs-names) t))))))
  
! (defun ucs-insert (character &optional count inherit)
!   "Insert COUNT copies of CHARACTER of the given Unicode code point.
  Interactively, prompts for a Unicode character name or a hex number
! using `read-char-by-name'.
! The optional third arg INHERIT (non-nil when called interactively),
! says to inherit text properties from adjoining text, if those
! properties are sticky."
!   (interactive
!    (list (read-char-by-name "Unicode (name or hex): ")
!        (prefix-numeric-value current-prefix-arg)
!        t))
!   (unless count (setq count 1))
!   (if (stringp character)
!       (setq character (string-to-number character 16)))
    (cond
!    ((not (integerp character))
!     (error "Not a Unicode character code: %S" character))
!    ((or (< character 0) (> character #x10FFFF))
!     (error "Not a Unicode character code: 0x%X" character)))
!   (if inherit
!       (dotimes (i count) (insert-and-inherit character))
!     (dotimes (i count) (insert character))))
  
  (define-key ctl-x-map "8\r" 'ucs-insert)

-- 
Juri Linkov
http://www.jurta.org/emacs/


--- End Message ---
--- Begin Message --- Subject: Re: bug#4039: C-x 8 RET with prefix arg doesn't repeat character Date: Wed, 12 Aug 2009 23:45:10 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
> I propose to fix `ucs-insert' to accept the same arguments
> as `insert-char', i.e. `character', `count' and `inherit':

Done.

-- 
Juri Linkov
http://www.jurta.org/emacs/

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]