GNU bug report logs - #13744
glyphless-char-display-control doesn't work with acronym

Previous Next

Package: emacs;

Reported by: starback <at> stp.lingfil.uu.se (Per Starbäck)

Date: Mon, 18 Feb 2013 16:09:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13744 in the body.
You can then email your comments to 13744 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13744; Package emacs. (Mon, 18 Feb 2013 16:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to starback <at> stp.lingfil.uu.se (Per Starbäck):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 Feb 2013 16:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: starback <at> stp.lingfil.uu.se (Per Starbäck)
To: bug-gnu-emacs <at> gnu.org
Subject: glyphless-char-display-control doesn't work with acronym
Date: Mon, 18 Feb 2013 17:07:12 +0100
In GNU Emacs 24.2.93.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9),
but it's not new in the pretests. (I think this bug has been present all
the time since this feature was introduced in 24.1.)

  $ LANG=C src/emacs -Q

  M-x customize-option RET glyphless-char-display-control RET

Activate c0-control and choose "Display acronym";
"Set for current session"

Switch to some buffer and C-q RET
It displays as "^M" but I expected a [CR] box.

(Settings other than acronym work as intended.)

=== THE REASON ===

The code puts 'acronym in glyphless-char-display, but there should
instead be the actual string to use.

=== FIX ===

$ diff -cp lisp/international/characters.el lisp/international/characters-fixed.el
*** lisp/international/characters.el	2013-01-01 21:37:17.000000000 +0100
--- lisp/international/characters-fixed.el	2013-02-18 16:11:10.064000575 +0100
*************** This function updates the char-table `gl
*** 1410,1425 ****
        (or (memq method '(zero-width thin-space empty-box acronym hex-code))
  	  (error "Invalid glyphless character display method: %s" method))
        (cond ((eq target 'c0-control)
! 	     (set-char-table-range glyphless-char-display '(#x00 . #x1F)
! 				   method)
  	     ;; Users will not expect their newlines and TABs be
  	     ;; displayed as anything but themselves, so exempt those
  	     ;; two characters from c0-control.
  	     (set-char-table-range glyphless-char-display #x9 nil)
  	     (set-char-table-range glyphless-char-display #xa nil))
  	    ((eq target 'c1-control)
! 	     (set-char-table-range glyphless-char-display '(#x80 . #x9F)
! 				   method))
  	    ((eq target 'format-control)
  	     (map-char-table
  	      #'(lambda (char category)
--- 1410,1425 ----
        (or (memq method '(zero-width thin-space empty-box acronym hex-code))
  	  (error "Invalid glyphless character display method: %s" method))
        (cond ((eq target 'c0-control)
! 	     (glyphless-set-char-table-range glyphless-char-display
! 					     #x00 #x1F method)
  	     ;; Users will not expect their newlines and TABs be
  	     ;; displayed as anything but themselves, so exempt those
  	     ;; two characters from c0-control.
  	     (set-char-table-range glyphless-char-display #x9 nil)
  	     (set-char-table-range glyphless-char-display #xa nil))
  	    ((eq target 'c1-control)
! 	     (glyphless-set-char-table-range glyphless-char-display
! 					     #x80 #x9F method))
  	    ((eq target 'format-control)
  	     (map-char-table
  	      #'(lambda (char category)
*************** This function updates the char-table `gl
*** 1443,1448 ****
--- 1443,1456 ----
  	    (t
  	     (error "Invalid glyphless character group: %s" target))))))
  
+ (defun glyphless-set-char-table-range (chartable from to method)
+   (if (eq method 'acronym)
+       (let ((i from))
+ 	(while (<= i to)
+ 	  (set-char-table-range chartable i (aref char-acronym-table i))
+ 	  (setq i (1+ i))))
+     (set-char-table-range chartable (cons from to) method)))
+ 
  ;;; Control of displaying glyphless characters.
  (defcustom glyphless-char-display-control
    '((format-control . thin-space)

======================================================================




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 11 Mar 2013 17:47:02 GMT) Full text and rfc822 format available.

Notification sent to starback <at> stp.lingfil.uu.se (Per Starbäck):
bug acknowledged by developer. (Mon, 11 Mar 2013 17:47:02 GMT) Full text and rfc822 format available.

Message #10 received at 13744-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: starback <at> stp.lingfil.uu.se (Per Starbäck)
Cc: 13744-done <at> debbugs.gnu.org
Subject: Re: bug#13744: glyphless-char-display-control doesn't work with
	acronym
Date: Mon, 11 Mar 2013 13:45:41 -0400
> The code puts 'acronym in glyphless-char-display, but there should
> instead be the actual string to use.

Thanks, installed,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Apr 2013 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.