Merge from trunk.
[bpt/emacs.git] / lisp / international / mule-diag.el
index c5f3f34..efb910a 100644 (file)
@@ -1,9 +1,8 @@
 ;;; mule-diag.el --- show diagnosis of multilingual environment (Mule)
 
-;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009  Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2011  Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 ;; Copyright (C) 2003
@@ -32,7 +31,7 @@
 ;;; Code:
 
 ;; Make sure the help-xref button type is defined.
-(require 'help-fns)
+(require 'help-mode)
 
 ;;; General utility function
 
@@ -368,7 +367,8 @@ meanings of these arguments."
          (when val
            (if (cadr elt) (insert (cadr elt)))
            (if (nth 2 elt)
-               (insert (funcall (nth 2 elt) val)))
+               (let ((print-length 10) (print-level 2))
+                 (princ (funcall (nth 2 elt) val) (current-buffer))))
            (insert ?\n)))))))
 \f
 ;;; CODING-SYSTEM
@@ -958,7 +958,7 @@ the current buffer."
        (insert "\n  ---<fallback to the default of the default fontset>---")
        (put-text-property (line-beginning-position) (point) 'face 'highlight)))
       (if (and start1 end2)
-         ;; Reoder the printed information to match with the font
+         ;; Reorder the printed information to match with the font
          ;; searching strategy; i.e. FONTSET, the default fontset,
          ;; default of FONTSET, default of the default fontset.
          (transpose-regions start1 end1 start2 end2))
@@ -1056,7 +1056,10 @@ installed LEIM (Libraries of Emacs Input Methods).")
                         (if (and (consp title) (stringp (car title)))
                             (car title)
                           title))
-                      (nth 4 elt)))))))
+                      ;; If the doc is multi-line, indent all
+                      ;; non-blank lines. (Bug#8066)
+                      (replace-regexp-in-string "\n\\(.\\)" "\n    \\1"
+                                                (or (nth 4 elt) ""))))))))
 \f
 ;;; DIAGNOSIS
 
@@ -1136,7 +1139,8 @@ system which uses fontsets)."
        (insert "Fontset-Name\t\t\t\t\t\t  WDxHT Style\n")
        (insert "------------\t\t\t\t\t\t  ----- -----\n")
        (dolist (fontset (fontset-list))
-         (print-fontset fontset t)))
+         (print-fontset fontset t)
+         (insert "\n")))
       (help-print-return-message))))
 
 ;;;###autoload
@@ -1168,5 +1172,4 @@ The default is 20.  If LIMIT is negative, do not limit the listing."
 
 (provide 'mule-diag)
 
-;; arch-tag: cd3b607c-2893-45a0-a4fa-a6535754dbee
 ;;; mule-diag.el ends here