1 ;;; descr-text.el --- describe text mode
3 ;; Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
6 ;; Author: Boris Goldowsky <boris@gnu.org>
8 ;; Keywords: faces, i18n, Unicode, multilingual
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 ;;; Describe-Text Mode.
31 (eval-when-compile (require 'quail
))
34 ;;; Describe-Text Utilities.
36 (defun describe-text-widget (widget)
37 "Insert text to describe WIDGET in the current buffer."
39 (symbol-name (if (symbolp widget
) widget
(car widget
)))
40 'action
`(lambda (&rest ignore
)
41 (widget-browse ',widget
))
42 'help-echo
"mouse-2, RET: browse this widget")
45 "(widget)Top" 'type
'help-info
'help-args
'("(widget)Top")))
47 (defun describe-text-sexp (sexp)
48 "Insert a short description of SEXP in the current buffer."
49 (let ((pp (condition-case signal
51 (error (prin1-to-string signal
)))))
52 (when (string-match-p "\n\\'" pp
)
53 (setq pp
(substring pp
0 (1- (length pp
)))))
55 (if (and (not (string-match-p "\n" pp
))
56 (<= (length pp
) (- (window-width) (current-column))))
59 "[Show]" 'action
`(lambda (&rest ignore
)
60 (with-output-to-temp-buffer
63 'help-echo
"mouse-2, RET: pretty print value in another buffer"))))
65 (defun describe-property-list (properties)
66 "Insert a description of PROPERTIES in the current buffer.
67 PROPERTIES should be a list of overlay or text properties.
68 The `category', `face' and `font-lock-face' properties are made
69 into help buttons that call `describe-text-category' or
70 `describe-face' when pushed."
71 ;; Sort the properties by the size of their value.
72 (dolist (elt (sort (let (ret)
74 (push (list (pop properties
) (pop properties
)) ret
))
76 (lambda (a b
) (string< (prin1-to-string (nth 0 a
) t
)
77 (prin1-to-string (nth 0 b
) t
)))))
78 (let ((key (nth 0 elt
))
80 (insert (propertize (format " %-20s " key
)
81 'face
'help-argument-name
))
82 (cond ((eq key
'category
)
85 'action
`(lambda (&rest ignore
)
86 (describe-text-category ',value
))
88 'help-echo
"mouse-2, RET: describe this category"))
89 ((memq key
'(face font-lock-face mouse-face
))
92 'type
'help-face
'help-args
(list value
)))
94 (describe-text-widget value
))
96 (describe-text-sexp value
))))
99 ;;; Describe-Text Commands.
101 (defun describe-text-category (category)
102 "Describe a text property category."
103 (interactive "SCategory: ")
104 (help-setup-xref (list #'describe-text-category category
)
105 (called-interactively-p 'interactive
))
106 (with-help-window (help-buffer)
107 (with-current-buffer standard-output
108 (insert "Category " (format "%S" category
) ":\n\n")
109 (describe-property-list (symbol-plist category
))
110 (goto-char (point-min)))))
113 (defun describe-text-properties (pos &optional output-buffer buffer
)
114 "Describe widgets, buttons, overlays, and text properties at POS.
115 POS is taken to be in BUFFER or in current buffer if nil.
116 Interactively, describe them for the character after point.
117 If optional second argument OUTPUT-BUFFER is non-nil,
118 insert the output into that buffer, and don't initialize or clear it
121 (let ((src-buf (current-buffer)))
122 (if buffer
(set-buffer buffer
) (setq buffer
(current-buffer)))
123 (if (>= pos
(point-max))
124 (error "No character follows specified position"))
126 (describe-text-properties-1 pos output-buffer
)
127 (if (not (or (text-properties-at pos
) (overlays-at pos
)))
128 (message "This is plain text.")
130 (setq output-buffer
(current-buffer))
131 (insert "Text content at position " (format "%d" pos
) ":\n\n")
133 (describe-text-properties-1 pos output-buffer
)
135 (help-setup-xref (list 'describe-text-properties pos nil buffer
)
136 (called-interactively-p 'interactive
))
137 (with-help-window (help-buffer)
138 (with-current-buffer standard-output
139 (buffer-swap-text output-buffer
)
140 (goto-char (point-min)))))))))
142 (defun describe-text-properties-1 (pos output-buffer
)
143 (let* ((properties (text-properties-at pos
))
144 (overlays (overlays-at pos
))
145 (wid-field (get-char-property pos
'field
))
146 (wid-button (get-char-property pos
'button
))
147 (wid-doc (get-char-property pos
'widget-doc
))
148 ;; If button.el is not loaded, we have no buttons in the text.
149 (button (and (fboundp 'button-at
) (button-at pos
)))
150 (button-type (and button
(button-type button
)))
151 (button-label (and button
(button-label button
)))
152 (widget (or wid-field wid-button wid-doc
)))
153 (with-current-buffer output-buffer
155 (when (widgetp widget
)
157 (insert (cond (wid-field "This is an editable text area")
158 (wid-button "This is an active area")
159 (wid-doc "This is documentation text")))
161 (describe-text-widget widget
)
164 (when (and button
(not (widgetp wid-button
)))
166 (insert "Here is a `" (format "%S" button-type
)
167 "' button labeled `" button-label
"'.\n\n"))
171 (if (eq (length overlays
) 1)
172 (insert "There is an overlay here:\n")
173 (insert "There are " (format "%d" (length overlays
))
174 " overlays here:\n"))
175 (dolist (overlay overlays
)
176 (insert " From " (format "%d" (overlay-start overlay
))
177 " to " (format "%d" (overlay-end overlay
)) "\n")
178 (describe-property-list (overlay-properties overlay
)))
183 (insert "There are text properties here:\n")
184 (describe-property-list properties
)))))
186 (defcustom describe-char-unidata-list
187 '(name old-name general-category decomposition
)
188 "List of Unicode-based character property names shown by `describe-char'."
191 :type
'(choice (const :tag
"All properties" t
)
193 (const :tag
"Unicode name" name
)
194 (const :tag
"Unicode old name" old-name
)
195 (const :tag
"Unicode general category " general-category
)
196 (const :tag
"Unicode canonical combining class"
197 canonical-combining-class
)
198 (const :tag
"Unicode bidi class" bidi-class
)
199 (const :tag
"Unicode decomposition mapping" decomposition
)
200 (const :tag
"Unicode decimal digit value" decimal-digit-value
)
201 (const :tag
"Unicode digit value" digit-value
)
202 (const :tag
"Unicode numeric value" numeric-value
)
203 (const :tag
"Unicode mirrored" mirrored
)
204 (const :tag
"Unicode ISO 10646 comment" iso-10646-comment
)
205 (const :tag
"Unicode simple uppercase mapping" uppercase
)
206 (const :tag
"Unicode simple lowercase mapping" lowercase
)
207 (const :tag
"Unicode simple titlecase mapping" titlecase
))))
209 (defcustom describe-char-unicodedata-file nil
210 "Location of Unicode data file.
211 This is the UnicodeData.txt file from the Unicode Consortium, used for
212 diagnostics. If it is non-nil `describe-char' will print data
213 looked up from it. This facility is mostly of use to people doing
214 multilingual development.
216 This is a fairly large file, not typically present on GNU systems.
217 At the time of writing it is at the URL
218 `http://www.unicode.org/Public/UNIDATA/UnicodeData.txt'."
221 :type
'(choice (const :tag
"None" nil
)
224 (defun describe-char-unicode-data (char)
225 "Return a list of Unicode data for unicode CHAR.
226 Each element is a list of a property description and the property value.
227 The list is null if CHAR isn't found in `describe-char-unicodedata-file'.
228 This function is semi-obsolete. Use `get-char-code-property'."
229 (when describe-char-unicodedata-file
230 (unless (file-exists-p describe-char-unicodedata-file
)
231 (error "`unicodedata-file' %s not found" describe-char-unicodedata-file
))
232 (with-current-buffer (get-buffer-create " *Unicode Data*")
233 (when (zerop (buffer-size))
234 ;; Don't use -literally in case of DOS line endings.
235 (insert-file-contents describe-char-unicodedata-file
))
236 (goto-char (point-min))
237 (let ((hex (format "%04X" char
))
239 (if (re-search-forward (concat "^" hex
) nil t
)
241 ;; It's not listed explicitly. Look for ranges, e.g. CJK
242 ;; ideographs, and check whether it's in one of them.
243 (while (and (re-search-forward "^\\([^;]+\\);[^;]+First>;" nil t
)
245 (string-to-number (match-string 1) 16)))
248 (looking-at "^\\([^;]+\\);[^;]+Last>;")
251 (string-to-number (match-string 1) 16))))))
252 (if (and (>= char first
)
256 (let ((fields (mapcar (lambda (elt)
257 (if (> (length elt
) 0)
261 (line-beginning-position)
264 ;; The length depends on whether the last field was empty.
265 (unless (or (= 13 (length fields
))
266 (= 14 (length fields
)))
267 (error "Invalid contents in %s" describe-char-unicodedata-file
))
268 ;; The field names and values lists are slightly
269 ;; modified from Mule-UCS unidata.el.
271 (list "Name" (let ((name (nth 0 fields
)))
272 ;; Check for <..., First>, <..., Last>
273 (if (string-match "\\`\\(<[^,]+\\)," name
)
274 (concat (match-string 1 name
) ">")
277 (let ((val (nth 1 fields
)))
278 (or (char-code-property-description
279 'general-category
(intern val
))
281 (list "Combining class"
282 (let ((val (nth 1 fields
)))
283 (or (char-code-property-description
284 'canonical-combining-class
(intern val
))
286 (list "Bidi category"
287 (let ((val (nth 1 fields
)))
288 (or (char-code-property-description
289 'bidi-class
(intern val
))
294 (let* ((parts (split-string (nth 4 fields
)))
296 (if (string-match "\\`<\\(.+\\)>\\'" info
)
297 (setq info
(match-string 1 info
))
299 (if info
(setq parts
(cdr parts
)))
300 (setq parts
(mapconcat
302 (string (string-to-number arg
16)))
304 (concat info parts
))))
305 (list "Decimal digit value"
309 (list "Numeric value"
312 (if (equal "Y" (nth 8 fields
))
314 (list "Old name" (nth 9 fields
))
315 (list "ISO 10646 comment" (nth 10 fields
))
316 (list "Uppercase" (and (nth 11 fields
)
317 (string (string-to-number
318 (nth 11 fields
) 16))))
319 (list "Lowercase" (and (nth 12 fields
)
320 (string (string-to-number
321 (nth 12 fields
) 16))))
322 (list "Titlecase" (and (nth 13 fields
)
323 (string (string-to-number
324 (nth 13 fields
) 16)))))))))))
326 ;; Not defined on builds without X, but behind display-graphic-p.
327 (declare-function internal-char-font
"fontset.c" (position &optional ch
))
329 ;; Return information about how CHAR is displayed at the buffer
330 ;; position POS. If the selected frame is on a graphic display,
331 ;; return a string "FONT-DRIVER:FONT-NAME (GLYPH-CODE)" where:
332 ;; FONT-DRIVER is the font-driver name,
333 ;; FONT-NAME is the font name,
334 ;; GLYPH-CODE is a hexadigit string representing the glyph-ID.
335 ;; Otherwise, return a string describing the terminal codes for the
337 (defun describe-char-display (pos char
)
338 (if (display-graphic-p (selected-frame))
339 (let ((char-font-info (internal-char-font pos char
)))
341 (let ((type (font-get (car char-font-info
) :type
))
342 (name (font-xlfd-name (car char-font-info
)))
343 (code (cdr char-font-info
)))
345 (format "%s:%s (#x%02X)" type name code
)
346 (format "%s:%s (#x%04X%04X)"
347 type name
(car code
) (cdr code
))))))
348 (let* ((charset (get-text-property pos
'charset
))
349 (coding (or (terminal-coding-system) 'us-ascii
))
350 (encoded (encode-coding-char char coding charset
)))
352 (encoded-string-description encoded coding
)))))
355 ;; Return a string of CH with composition for padding on both sides.
356 ;; It is displayed without overlapping with the left/right columns.
357 (defsubst describe-char-padded-string
(ch)
358 (if (internal-char-font nil ch
)
359 (compose-string (string ch
) 0 1 (format "\t%c\t" ch
))
362 ;; Return a nicely formated list of categories; extended category
363 ;; description is added to the category name as a tooltip
364 (defsubst describe-char-categories
(category-set)
365 (let ((mnemonics (category-set-mnemonics category-set
)))
366 (unless (eq mnemonics
"")
369 (let* ((c (category-docstring x
))
370 (doc (if (string-match "\\`\\(.*?\\)\n\\(.*\\)\\'" c
)
371 (propertize (match-string 1 c
)
372 'help-echo
(match-string 2 c
))
374 (format "%c:%s" x doc
)))
378 (defun describe-char (pos &optional buffer
)
379 "Describe the character after POS (interactively, the character after point).
380 Is POS is taken to be in buffer BUFFER or current buffer if nil.
381 The information includes character code, charset and code points in it,
382 syntax, category, how the character is encoded in a file,
383 character composition information (if relevant),
384 as well as widgets, buttons, overlays, and text properties."
386 (unless (buffer-live-p buffer
) (setq buffer
(current-buffer)))
387 (let ((src-buf (current-buffer)))
389 (if (>= pos
(point-max))
390 (error "No character follows specified position"))
391 (let* ((char (char-after pos
))
392 (eight-bit-p (and (not enable-multibyte-characters
) (>= char
128)))
393 (charset (if eight-bit-p
'eight-bit
394 (or (get-text-property pos
'charset
)
395 (char-charset char
))))
396 (composition (find-composition pos nil nil t
))
397 (component-chars nil
)
398 (display-table (or (window-display-table)
400 standard-display-table
))
401 (disp-vector (and display-table
(aref display-table char
)))
402 (multibyte-p enable-multibyte-characters
)
403 (overlays (mapcar #'(lambda (o) (overlay-properties o
))
405 (char-description (if (not multibyte-p
)
406 (single-key-description char
)
408 (single-key-description char
)
410 (char-to-string char
)))))
412 (let ((tmp-buf (generate-new-buffer " *text-props*")))
415 (describe-text-properties pos tmp-buf
)
416 (with-current-buffer tmp-buf
(buffer-string)))
417 (kill-buffer tmp-buf
))))
418 item-list max-width code
)
421 (or (setq code
(encode-char char charset
))
422 (setq charset
(char-charset char
)
423 code
(encode-char char charset
)))
426 ;; When the composition is trivial (i.e. composed only with the
427 ;; current character itself without any alternate characters),
428 ;; we don't show the composition information. Otherwise, store
429 ;; two descriptive strings in the first two elements of
432 (let ((from (car composition
))
433 (to (nth 1 composition
))
434 (components (nth 2 composition
))
436 (if (and (vectorp components
) (vectorp (aref components
0)))
437 (let ((idx (- pos from
))
438 (nglyphs (lgstring-glyph-len components
))
439 (i 0) j glyph glyph-from
)
440 ;; COMPONENTS is a gstring. Find a grapheme
441 ;; cluster containing the current character.
442 (while (and (< i nglyphs
)
443 (setq glyph
(lgstring-glyph components i
))
444 (< (lglyph-to glyph
) idx
))
446 (if (or (not glyph
) (= i nglyphs
))
447 ;; The composition is broken.
449 (setq glyph-from
(lglyph-from glyph
)
450 to
(+ from
(lglyph-to glyph
) 1)
451 from
(+ from glyph-from
)
453 (while (and (< j nglyphs
)
454 (setq glyph
(lgstring-glyph components j
))
455 (= (lglyph-from glyph
) glyph-from
))
457 (if (and (= to
(1+ from
))
459 (setq glyph
(lgstring-glyph components i
))
460 (= char
(lglyph-char glyph
)))
461 ;; The composition is trivial.
463 (nconc composition
(list i
(1- j
))))
464 (dotimes (i (length components
))
465 (if (integerp (setq ch
(aref components i
)))
466 (push (cons ch
(describe-char-display pos ch
))
468 (setq component-chars
(nreverse component-chars
)))
473 " with the surrounding characters \""
474 (mapconcat 'describe-char-padded-string
475 (buffer-substring from pos
) "")
477 (mapconcat 'describe-char-padded-string
478 (buffer-substring (1+ pos
) to
) "")
482 " with the preceding character(s) \""
483 (mapconcat 'describe-char-padded-string
484 (buffer-substring from pos
) "")
489 " with the following character(s) \""
490 (mapconcat 'describe-char-padded-string
491 (buffer-substring (1+ pos
) to
) "")
493 (setcar composition nil
)))
494 (setcar (cdr composition
)
495 (format "composed to form \"%s\" (see below)"
496 (buffer-substring from to
)))))
497 (setq composition nil
)))
501 ,(format "%s (%d, #o%o, #x%x)"
502 (apply 'propertize char-description
503 (text-properties-at pos
))
506 ,`(insert-text-button
507 ,(symbol-name charset
)
508 'type
'help-character-set
'help-args
'(,charset
))
509 ,(format "(%s)" (charset-description charset
)))
511 ,(let ((str (if (integerp code
)
512 (format (if (< code
256) "0x%02X" "0x%04X")
514 (format "0x%04X%04X" (car code
) (cdr code
)))))
515 (if (<= (charset-dimension charset
) 2)
518 'action
(lambda (&rest ignore
)
519 (list-charset-chars ',charset
)
520 (with-selected-window
521 (get-buffer-window "*Character List*" 0)
522 (goto-char (point-min))
523 (forward-line 2) ;Skip the header.
524 (let ((case-fold-search nil
))
526 ,(char-to-string char
) nil t
)
527 (goto-char (match-beginning 0))))))
530 "mouse-2, RET: show this character in its character set")
533 ,(let ((syntax (syntax-after pos
)))
535 (internal-describe-syntax-value syntax
)
538 ,@(if (not eight-bit-p
)
539 (let ((category-set (char-category-set char
)))
541 (describe-char-categories category-set
)
544 ,@(if (not eight-bit-p
)
545 (let ((key-list (and (eq input-method-function
547 (quail-find-key char
))))
556 ,current-input-method
557 'type
'help-input-method
558 'help-args
'(,current-input-method
)))))))
561 (encoded-string-description
562 (string-as-unibyte (char-to-string char
)) nil
)
563 (format "#x%02X" char
)))
566 (let* ((coding buffer-file-coding-system
)
567 (encoded (encode-coding-char char coding charset
)))
569 (list (encoded-string-description encoded coding
)
570 (format "(encoded by coding system %S)"
572 (list "not encodable by coding system"
573 (symbol-name coding
))))
574 (list (format "#x%02X" char
))))
578 (setq disp-vector
(copy-sequence disp-vector
))
579 (dotimes (i (length disp-vector
))
581 (cons (aref disp-vector i
)
582 (describe-char-display
583 pos
(glyph-char (aref disp-vector i
))))))
584 (format "by display table entry [%s] (see below)"
587 (format "?%c" (glyph-char (car x
))))
592 (let ((display (describe-char-display pos char
)))
593 (if (display-graphic-p (selected-frame))
595 (concat "by this font (glyph code)\n " display
)
598 (format "terminal code %s" display
)
599 "not encodable for terminal"))))))
601 (if (not (or disp-vector composition
))
603 ((and show-trailing-whitespace
604 (save-excursion (goto-char pos
)
605 (looking-at-p "[ \t]+$")))
606 'trailing-whitespace
)
607 ((and nobreak-char-display char
(eq char
'#xa0
))
609 ((and nobreak-char-display char
(eq char
'#xad
))
611 ((and (< char
32) (not (memq char
'(9 10))))
613 (if face
(list (list "hardcoded face"
617 'help-args
'(,face
))))))
618 ,@(if (not eight-bit-p
)
619 (let ((unicodedata (describe-char-unicode-data char
)))
621 (cons (list "Unicode data" " ") unicodedata
))))))
622 (setq max-width
(apply 'max
(mapcar (lambda (x)
623 (if (cadr x
) (length (car x
)) 0))
626 (help-setup-xref (list 'describe-char pos buffer
)
627 (called-interactively-p 'interactive
))
628 (with-help-window (help-buffer)
629 (with-current-buffer standard-output
630 (set-buffer-multibyte multibyte-p
)
631 (let ((formatter (format "%%%ds:" max-width
)))
632 (dolist (elt item-list
)
634 (insert (format formatter
(car elt
)))
635 (dolist (clm (cdr elt
))
636 (if (eq (car-safe clm
) 'insert-text-button
)
637 (progn (insert " ") (eval clm
))
638 (when (>= (+ (current-column)
639 (or (string-match-p "\n" clm
)
644 (indent-to (1+ max-width
)))
650 (goto-char (point-min))
651 (re-search-forward "character:[ \t\n]+")
652 (let ((end (+ (point) (length char-description
))))
653 (mapc #'(lambda (props)
654 (let ((o (make-overlay (point) end
)))
656 (overlay-put o
(car props
) (nth 1 props
))
657 (setq props
(cddr props
)))))
662 "\nThe display table entry is displayed by ")
663 (if (display-graphic-p (selected-frame))
665 (insert "these fonts (glyph codes):\n")
666 (dotimes (i (length disp-vector
))
667 (insert (glyph-char (car (aref disp-vector i
))) ?
:
668 (propertize " " 'display
'(space :align-to
5))
669 (or (cdr (aref disp-vector i
)) "-- no font --")
671 (let ((face (glyph-face (car (aref disp-vector i
)))))
673 (insert (propertize " " 'display
'(space :align-to
5))
675 (insert (concat "`" (symbol-name face
) "'"))
677 (insert "these terminal codes:\n")
678 (dotimes (i (length disp-vector
))
679 (insert (car (aref disp-vector i
))
680 (propertize " " 'display
'(space :align-to
5))
681 (or (cdr (aref disp-vector i
)) "-- not encodable --")
685 (insert "\nComposed")
686 (if (car composition
)
687 (insert (car composition
)))
688 (if (and (vectorp (nth 2 composition
))
689 (vectorp (aref (nth 2 composition
) 0)))
690 (let* ((gstring (nth 2 composition
))
691 (font (lgstring-font gstring
))
692 (from (nth 3 composition
))
693 (to (nth 4 composition
))
697 (insert " using this font:\n "
698 (symbol-name (font-get font
:type
))
700 (aref (query-font font
) 0)
701 "\nby these glyphs:\n")
702 (while (and (<= from to
)
703 (setq glyph
(lgstring-glyph gstring from
)))
704 (insert (format " %S\n" glyph
))
705 (setq from
(1+ from
))))
706 (insert " by these characters:\n")
707 (while (and (<= from to
)
708 (setq glyph
(lgstring-glyph gstring from
)))
709 (insert (format " %c (#x%d)\n"
710 (lglyph-char glyph
) (lglyph-char glyph
)))
711 (setq from
(1+ from
)))))
712 (insert " by the rule:\n\t(")
715 (if first
(setq first nil
)
717 (if (consp x
) (insert (format "%S" x
))
718 (if (= x ?
\t) (insert (single-key-description x
))
720 (insert (describe-char-padded-string x
)))))
721 (nth 2 composition
)))
722 (insert ")\nThe component character(s) are displayed by ")
723 (if (display-graphic-p (selected-frame))
725 (insert "these fonts (glyph codes):")
726 (dolist (elt component-chars
)
727 (if (/= (car elt
) ?
\t)
729 (describe-char-padded-string (car elt
))
732 'display
'(space :align-to
5))
733 (or (cdr elt
) "-- no font --")))))
734 (insert "these terminal codes:")
735 (dolist (elt component-chars
)
736 (insert "\n " (car elt
) ":"
737 (propertize " " 'display
'(space :align-to
4))
738 (or (cdr elt
) "-- not encodable --"))))
739 (insert "\nSee the variable `reference-point-alist' for "
740 "the meaning of the rule.\n")))
743 (insert (if (not describe-char-unidata-list
)
744 "\nCharacter code properties are not shown: "
745 "\nCharacter code properties: "))
747 "customize what to show"
748 'action
(lambda (&rest ignore
)
750 'describe-char-unidata-list
))
753 (dolist (elt (if (eq describe-char-unidata-list t
)
754 (nreverse (mapcar 'car char-code-property-alist
))
755 describe-char-unidata-list
))
756 (let ((val (get-char-code-property char elt
))
759 (setq description
(char-code-property-description elt val
))
760 (insert (if description
761 (format " %s: %s (%s)\n" elt val description
)
762 (format " %s: %s\n" elt val
)))))))
764 (if text-props-desc
(insert text-props-desc
))
765 (toggle-read-only 1))))))
767 (define-obsolete-function-alias 'describe-char-after
'describe-char
"22.1")
769 (provide 'descr-text
)
771 ;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1
772 ;;; descr-text.el ends here