(mapcar (lambda (f)
(let ((s (symbol-name f)))
(when (or all-faces (string-match-p regexp s))
- (setq max-length (max (length s) max-length))
+ (setq max-length (max (string-width s)
+ max-length))
f)))
(sort (face-list) #'string-lessp))))
(unless faces
(with-help-window "*Faces*"
(with-current-buffer standard-output
(setq truncate-lines t)
- (insert
- (substitute-command-keys
- (concat
- "\\<help-mode-map>Use "
- (if (display-mouse-p) "\\[help-follow-mouse] or ")
- "\\[help-follow] on a face name to customize it\n"
- "or on its sample text for a description of the face.\n\n")))
+ (insert (format line-format
+ (substitute-command-keys
+ "Face (\\<button-map>\\[push-button] for details)"))
+ "Sample\n"
+ (make-string (1- max-length) ?-) " "
+ (make-string (string-width list-faces-sample-text) ?-) "\n")
(setq help-xref-stack nil)
(dolist (face faces)
(setq face-name (symbol-name face))
;; Insert header.
(insert "Supplementary character sets are shown below.\n")
(insert
- (substitute-command-keys
- (concat "Use "
- (if (display-mouse-p) "\\[help-follow-mouse] or ")
- "\\[help-follow]:\n")))
+ (substitute-command-keys "Use \\<button-map>\\[push-button]:\n"))
(insert " on a column title to sort by that title,")
(indent-to 48)
(insert "+----DIMENSION\n")