;;; descr-text.el --- describe text mode -*- lexical-binding:t -*-
-;; Copyright (C) 1994-1996, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2001-2016 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Maintainer: emacs-devel@gnu.org
;; Buttons
(when (and button (not (widgetp wid-button)))
(newline)
- (insert (format "Here is a ‘%S’ button labeled ‘%s’.\n\n"
- button-type button-label)))
+ (insert (format-message "Here is a `%S' button labeled `%s'.\n\n"
+ button-type button-label)))
;; Overlays
(when overlays
(newline)
(nth 13 fields) 16)))))))))))
;; Not defined on builds without X, but behind display-graphic-p.
-(declare-function internal-char-font "fontset.c" (position &optional ch))
+(declare-function internal-char-font "font.c" (position &optional ch))
;; Return information about how CHAR is displayed at the buffer
;; position POS. If the selected frame is on a graphic display,
(let ((name
(or (get-char-code-property char 'name)
(get-char-code-property char 'old-name))))
- (if name
+ (if (and name (assoc-string name (ucs-names)))
(format
"type \"C-x 8 RET %x\" or \"C-x 8 RET %s\""
char name)
(when disp-vector
(insert
"\nThe display table entry is displayed by ")
- (if (display-graphic-p (selected-frame))
- (progn
- (insert "these fonts (glyph codes):\n")
- (dotimes (i (length disp-vector))
- (insert (glyph-char (car (aref disp-vector i))) ?:
- (propertize " " 'display '(space :align-to 5))
- (or (cdr (aref disp-vector i)) "-- no font --")
- "\n")
- (let ((face (glyph-face (car (aref disp-vector i)))))
- (when face
- (insert (propertize " " 'display '(space :align-to 5))
- "face: ")
- (insert (format "‘%s’\n" face))))))
- (insert "these terminal codes:\n")
- (dotimes (i (length disp-vector))
- (insert (car (aref disp-vector i))
- (propertize " " 'display '(space :align-to 5))
- (or (cdr (aref disp-vector i)) "-- not encodable --")
- "\n"))))
+ (insert "these fonts (glyph codes):\n")
+ (dotimes (i (length disp-vector))
+ (insert (glyph-char (car (aref disp-vector i))) ?:
+ (propertize " " 'display '(space :align-to 5))
+ (or (cdr (aref disp-vector i)) "-- no font --")
+ "\n")
+ (let ((face (glyph-face (car (aref disp-vector i)))))
+ (when face
+ (insert (propertize " " 'display '(space :align-to 5))
+ "face: ")
+ (insert (format-message "`%s'\n" face))))))
(when composition
(insert "\nComposed")
(insert "\n " (car elt) ":"
(propertize " " 'display '(space :align-to 4))
(or (cdr elt) "-- not encodable --"))))
- (insert "\nSee the variable `reference-point-alist' for "
+ (insert (substitute-command-keys
+ "\nSee the variable `reference-point-alist' for ")
"the meaning of the rule.\n")))
(unless eight-bit-p