Fix arg usage of format-decode-run-method (Bug#7488).
[bpt/emacs.git] / lisp / international / mule-diag.el
index 1550443..ed2f7e3 100644 (file)
@@ -1,9 +1,9 @@
 ;;; 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.
+;;   2007, 2008, 2009, 2010  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
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 ;; Copyright (C) 2003
@@ -32,7 +32,7 @@
 ;;; Code:
 
 ;; Make sure the help-xref button type is defined.
-(require 'help-fns)
+(require 'help-mode)
 
 ;;; General utility function
 
@@ -67,7 +67,8 @@ ISO-2022-based coding systems.
 With prefix ARG, the output format gets more cryptic,
 but still shows the full information."
   (interactive "P")
-  (help-setup-xref (list #'list-character-sets arg) (interactive-p))
+  (help-setup-xref (list #'list-character-sets arg)
+                  (called-interactively-p 'interactive))
   (with-output-to-temp-buffer "*Character Set List*"
     (with-current-buffer standard-output
       (if arg
@@ -158,7 +159,7 @@ SORT-KEY should be `name' or `iso-spec' (default `name')."
                                'type 'help-info
                                'help-args '("(emacs)Charsets"))
            (insert " --------------
-Character sets for defining another charset or obsolete now
+Character sets for defining other charsets, or for backward compatibility
 "))
        (insert-text-button (symbol-name (car elt)) ; NAME
                            :type 'list-charset-chars
@@ -314,7 +315,8 @@ meanings of these arguments."
   (interactive (list (read-charset "Charset: ")))
   (or (charsetp charset)
       (error "Invalid charset: %S" charset))
-  (help-setup-xref (list #'describe-character-set charset) (interactive-p))
+  (help-setup-xref (list #'describe-character-set charset)
+                  (called-interactively-p 'interactive))
   (with-output-to-temp-buffer (help-buffer)
     (with-current-buffer standard-output
       (insert "Character set: " (symbol-name charset))
@@ -366,7 +368,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
@@ -419,7 +422,7 @@ meanings of these arguments."
   (if (null coding-system)
       (describe-current-coding-system)
     (help-setup-xref (list #'describe-coding-system coding-system)
-                    (interactive-p))
+                    (called-interactively-p 'interactive))
     (with-output-to-temp-buffer (help-buffer)
       (print-coding-system-briefly coding-system 'doc-string)
       (let ((type (coding-system-type coding-system))
@@ -983,7 +986,8 @@ This shows which font is used for which character(s)."
   (if (= (length fontset) 0)
       (setq fontset (face-attribute 'default :fontset))
     (setq fontset (query-fontset fontset)))
-  (help-setup-xref (list #'describe-fontset fontset) (interactive-p))
+  (help-setup-xref (list #'describe-fontset fontset)
+                  (called-interactively-p 'interactive))
   (with-output-to-temp-buffer (help-buffer)
     (with-current-buffer standard-output
       (print-fontset fontset t))))
@@ -999,7 +1003,8 @@ see the function `describe-fontset' for the format of the list."
   (interactive "P")
   (if (not (and window-system (fboundp 'fontset-list)))
       (error "No fontsets being used")
-    (help-setup-xref (list #'list-fontsets arg) (interactive-p))
+    (help-setup-xref (list #'list-fontsets arg)
+                    (called-interactively-p 'interactive))
     (with-output-to-temp-buffer (help-buffer)
       (with-current-buffer standard-output
        ;; This code is duplicated near the end of mule-diag.
@@ -1018,7 +1023,8 @@ see the function `describe-fontset' for the format of the list."
 (defun list-input-methods ()
   "Display information about all input methods."
   (interactive)
-  (help-setup-xref '(list-input-methods) (interactive-p))
+  (help-setup-xref '(list-input-methods)
+                  (called-interactively-p 'interactive))
   (with-output-to-temp-buffer (help-buffer)
     (list-input-methods-1)
     (with-current-buffer standard-output
@@ -1088,7 +1094,8 @@ system which uses fontsets)."
       (insert "Version of this emacs:\n  " (emacs-version) "\n\n")
       (insert "Configuration options:\n  " system-configuration-options "\n\n")
       (insert "Multibyte characters awareness:\n"
-             (format "  default: %S\n" default-enable-multibyte-characters)
+             (format "  default: %S\n" (default-value
+                                         'enable-multibyte-characters))
              (format "  current-buffer: %S\n\n" enable-multibyte-characters))
       (insert "Current language environment: " current-language-environment
              "\n\n")