+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:
(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)
(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)