mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
(print-fontset): Don't hang even if a
fontset name doesn't confirm to XLFD. (describe-current-coding-system): Do not show the same coding system twice in the list of priority order.
This commit is contained in:
parent
2de6d4470c
commit
5cfcd8bc91
1 changed files with 25 additions and 19 deletions
|
|
@ -300,15 +300,19 @@ at the place of `..':
|
|||
(princ "\nPriority order for recognizing coding systems when reading files:\n")
|
||||
(let ((l coding-category-list)
|
||||
(i 1)
|
||||
(coding-list nil)
|
||||
coding aliases)
|
||||
(while l
|
||||
(setq coding (symbol-value (car l)))
|
||||
(princ (format " %d. %s" i coding))
|
||||
(when (setq aliases (get coding 'alias-coding-systems))
|
||||
(princ " ")
|
||||
(princ (cons 'alias: aliases)))
|
||||
(terpri)
|
||||
(setq l (cdr l) i (1+ i))))
|
||||
(when (not (memq coding coding-list))
|
||||
(setq coding-list (cons coding coding-list))
|
||||
(princ (format " %d. %s" i coding))
|
||||
(when (setq aliases (get coding 'alias-coding-systems))
|
||||
(princ " ")
|
||||
(princ (cons 'alias: aliases)))
|
||||
(terpri)
|
||||
(setq i (1+ i)))
|
||||
(setq l (cdr l))))
|
||||
(princ "\n Other coding systems cannot be distinguished automatically
|
||||
from these, and therefore cannot be recognized automatically
|
||||
with the present coding system priorities.\n\n")
|
||||
|
|
@ -527,20 +531,22 @@ but contains full information about each coding systems."
|
|||
(height (aref fontset-info 1))
|
||||
(fonts (and print-fonts (aref fontset-info 2)))
|
||||
(xlfd-fields (x-decompose-font-name fontset))
|
||||
(weight (aref xlfd-fields xlfd-regexp-weight-subnum))
|
||||
(slant (aref xlfd-fields xlfd-regexp-slant-subnum))
|
||||
style)
|
||||
(if (string-match "^bold$\\|^demibold$" weight)
|
||||
(setq style (concat weight " "))
|
||||
(setq style "medium "))
|
||||
(cond ((string-match "^i$" slant)
|
||||
(setq style (concat style "italic")))
|
||||
((string-match "^o$" slant)
|
||||
(setq style (concat style "slant")))
|
||||
((string-match "^ri$" slant)
|
||||
(setq style (concat style "reverse italic")))
|
||||
((string-match "^ro$" slant)
|
||||
(setq style (concat style "reverse slant"))))
|
||||
(if xlfd-fields
|
||||
(let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum))
|
||||
(slant (aref xlfd-fields xlfd-regexp-slant-subnum)))
|
||||
(if (string-match "^bold$\\|^demibold$" weight)
|
||||
(setq style (concat weight " "))
|
||||
(setq style "medium "))
|
||||
(cond ((string-match "^i$" slant)
|
||||
(setq style (concat style "italic")))
|
||||
((string-match "^o$" slant)
|
||||
(setq style (concat style "slant")))
|
||||
((string-match "^ri$" slant)
|
||||
(setq style (concat style "reverse italic")))
|
||||
((string-match "^ro$" slant)
|
||||
(setq style (concat style "reverse slant")))))
|
||||
(setq style " ? "))
|
||||
(beginning-of-line)
|
||||
(insert fontset)
|
||||
(indent-to 58)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue