Show
Ignore:
Timestamp:
08/10/06 11:19:54 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/international/mule-diag.el

    r3894 r4140  
    10401040;;;###autoload 
    10411041(defun describe-font (fontname) 
    1042   "Display information about fonts which partially match FONTNAME." 
    1043   (interactive "sFontname (default current choice for ASCII chars): ") 
     1042  "Display information about a font whose name is FONTNAME. 
     1043The font must be already used by Emacs." 
     1044  (interactive "sFont name (default current choice for ASCII chars): ") 
    10441045  (or (and window-system (fboundp 'fontset-list)) 
    1045       (error "No fontsets being used")) 
    1046   (when (or (not fontname) (= (length fontname) 0)) 
    1047     (setq fontname (cdr (assq 'font (frame-parameters)))) 
    1048     (if (query-fontset fontname) 
    1049         (setq fontname 
    1050               (nth 1 (assq 'ascii (aref (fontset-info fontname) 2)))))) 
    1051   (let ((font-info (font-info fontname))) 
     1046      (error "No fonts being used")) 
     1047  (let (fontset font-info) 
     1048    (when (or (not fontname) (= (length fontname) 0)) 
     1049      (setq fontname (frame-parameter nil 'font)) 
     1050      ;; Check if FONTNAME is a fontset. 
     1051      (if (query-fontset fontname) 
     1052          (setq fontset fontname 
     1053                fontname (nth 1 (assq 'ascii 
     1054                                      (aref (fontset-info fontname) 2)))))) 
     1055    (setq font-info (font-info fontname)) 
    10521056    (if (null font-info) 
    1053         (message "No matching font") 
     1057        (if fontset 
     1058            ;; The font should be surely used.  So, there's some 
     1059            ;; problem about getting information about it.  It is 
     1060            ;; better to print the fontname to show which font has 
     1061            ;; this problem. 
     1062            (message "No information about \"%s\"" fontname) 
     1063          (message "No matching font being used")) 
    10541064      (with-output-to-temp-buffer "*Help*" 
    10551065        (describe-font-internal font-info 'verbose)))))