unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4039: C-x 8 RET with prefix arg doesn't repeat character
@ 2009-08-04 19:51 ` Juri Linkov
  2009-08-12 20:50   ` bug#4039: marked as done (C-x 8 RET with prefix arg doesn't repeat character) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2009-08-04 19:51 UTC (permalink / raw)
  To: emacs-pretest-bug

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/





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#4039: marked as done (C-x 8 RET with prefix arg doesn't repeat character)
  2009-08-04 19:51 ` bug#4039: C-x 8 RET with prefix arg doesn't repeat character Juri Linkov
@ 2009-08-12 20:50   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-08-12 20:50 UTC (permalink / raw)
  To: Juri Linkov

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]


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

[-- Attachment #2: Type: message/rfc822, Size: 4750 bytes --]

From: Juri Linkov <juri@jurta.org>
To: emacs-pretest-bug@gnu.org
Subject: C-x 8 RET with prefix arg doesn't repeat character
Date: Tue, 04 Aug 2009 22:51:47 +0300
Message-ID: <87prbbfjcc.fsf@mail.jurta.org>

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/


[-- Attachment #3: Type: message/rfc822, Size: 1626 bytes --]

From: Juri Linkov <juri@jurta.org>
To: 4039-done@emacsbugs.donarmstrong.com
Subject: Re: bug#4039: C-x 8 RET with prefix arg doesn't repeat character
Date: Wed, 12 Aug 2009 23:45:10 +0300
Message-ID: <87d470lq21.fsf@mail.jurta.org>

> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-12 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87d470lq21.fsf@mail.jurta.org>
2009-08-04 19:51 ` bug#4039: C-x 8 RET with prefix arg doesn't repeat character Juri Linkov
2009-08-12 20:50   ` bug#4039: marked as done (C-x 8 RET with prefix arg doesn't repeat character) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).