Commit bd3921f0 authored by Per Starbäck's avatar Per Starbäck Committed by Stefan Monnier
Browse files

* lisp/international/characters.el (glyphless-set-char-table-range): New fun.

(update-glyphless-char-display): Use it.

Fixes: debbugs:13744
parent ccc4f9f1
2013-03-11 Per Starbäck <starback@stp.lingfil.uu.se>
* international/characters.el (glyphless-set-char-table-range): New fun.
(update-glyphless-char-display): Use it (bug#13744).
2013-03-11 Teodor Zlatanov <tzz@lifelogs.com>
 
* progmodes/cfengine.el: Update for CFEngine 3.4.2 and higher:
......
......@@ -1410,16 +1410,16 @@ This function updates the char-table `glyphless-char-display'."
(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)
(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)
(set-char-table-range glyphless-char-display '(#x80 . #x9F)
method))
(glyphless-set-char-table-range glyphless-char-display
#x80 #x9F method))
((eq target 'format-control)
(map-char-table
#'(lambda (char category)
......@@ -1443,6 +1443,14 @@ This function updates the char-table `glyphless-char-display'."
(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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment