changeset 89105:890a4fa8cbdd

(charset): Move. (language-info-custom-alist): Move. Alter :set.
author Dave Love <fx@gnu.org>
date Fri, 13 Sep 2002 23:25:28 +0000
parents 5434ecb9fbd5
children 4b0c0e0d0458
files lisp/international/mule-cmds.el
diffstat 1 files changed, 60 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Fri Sep 13 11:22:21 2002 +0000
+++ b/lisp/international/mule-cmds.el	Fri Sep 13 23:25:28 2002 +0000
@@ -772,62 +772,6 @@
 			but as non-ASCII characters in this language
 			environment.")
 
-(define-widget 'charset 'symbol
-  :complete-function (lambda ()
-		       (interactive)
-		       (lisp-complete-symbol 'charsetp))
-  :completion-ignore-case t
-  :value 'ascii
-  :validate (lambda (widget)
-	      (unless (charsetp (widget-value widget))
-		(widget-put widget :error (format "Invalid charset: %S"
-						  (widget-value widget)))
-		widget))
-  :prompt-history 'charset-history)
-
-(defcustom language-info-custom-alist nil
-  "Customizations of language environment parameters.
-Value is an alist with elements like those of `language-info-alist'.
-These are used to set values in `language-info-alist' which replace
-the defaults.  A typical use is replacing the default input method for
-the environment.  Use \\[describe-language-environment] to find the environment's
-settings.
-
-Setting this variable directly does not take effect.  See
-`set-language-info-alist' for use in programs."
-  :group 'mule
-  :version "22.1"
-  :set (lambda (s v)
-	 (custom-set-default s v)
-	 ;; modify language-info-alist
-	 (dolist (elt v)
-	   (set-language-info-alist (car elt) (cdr elt)))
-	 ;; re-set the environment in case its parameters changed
-	 (set-language-environment current-language-environment))
-  :type `(alist
-	  :key-type (string :tag "Language environment"
-			    :completion-ignore-case t
-			    :complete-function widget-string-complete
-			    :completion-alist language-info-alist)
-	  :value-type
-	  (alist :key-type symbol
-		 :options ((documentation string)
-			   (charset (repeat charset))
-			   (sample-text string)
-			   (setup-function function)
-			   (exit-function function)
-			   (coding-system (repeat coding-system))
-			   (coding-priority (repeat coding-system))
-			   (nonascii-translation charset)
-			   (input-method
-			    (string
-			     :completion-ignore-case t
-			     :complete-function widget-string-complete
-			     :completion-alist input-method-alist
-			     :prompt-history input-method-history))
-			   (features (repeat symbol))
-			   (unibyte-display coding-system)))))
-
 (defun get-language-info (lang-env key)
   "Return information listed under KEY for language environment LANG-ENV.
 KEY is a symbol denoting the kind of information.
@@ -1544,6 +1488,66 @@
   (run-hooks 'set-language-environment-hook)
   (force-mode-line-update t))
 
+(define-widget 'charset 'symbol
+  :complete-function (lambda ()
+		       (interactive)
+		       (lisp-complete-symbol 'charsetp))
+  :completion-ignore-case t
+  :value 'ascii
+  :validate (lambda (widget)
+	      (unless (charsetp (widget-value widget))
+		(widget-put widget :error (format "Invalid charset: %S"
+						  (widget-value widget)))
+		widget))
+  :prompt-history 'charset-history)
+
+(defcustom language-info-custom-alist nil
+  "Customizations of language environment parameters.
+Value is an alist with elements like those of `language-info-alist'.
+These are used to set values in `language-info-alist' which replace
+the defaults.  A typical use is replacing the default input method for
+the environment.  Use \\[describe-language-environment] to find the environment's settings.
+
+This option is intended for use at startup.  Removing items doesn't
+remove them from the language info until you next restart Emacs.
+
+Setting this variable directly does not take effect.  See
+`set-language-info-alist' for use in programs."
+  :group 'mule
+  :version "22.1"
+  :set (lambda (s v)
+	 (custom-set-default s v)
+	 ;; Can't do this before language environments are set up.
+	 (when v
+	   ;; modify language-info-alist
+	   (dolist (elt v)
+	     (set-language-info-alist (car elt) (cdr elt)))
+	   ;; re-set the environment in case its parameters changed
+	   (set-language-environment current-language-environment)))
+  :type `(alist
+	  :key-type (string :tag "Language environment"
+			    :completion-ignore-case t
+			    :complete-function widget-string-complete
+			    :completion-alist language-info-alist)
+	  :value-type
+	  (alist :key-type symbol
+		 :options ((documentation string)
+			   (charset (repeat charset))
+			   (sample-text string)
+			   (setup-function function)
+			   (exit-function function)
+			   (coding-system (repeat coding-system))
+			   (coding-priority (repeat coding-system))
+			   (nonascii-translation charset)
+			   (input-method
+			    (string
+			     :completion-ignore-case t
+			     :complete-function widget-string-complete
+			     :completion-alist input-method-alist
+			     :prompt-history input-method-history))
+			   (features (repeat symbol))
+			   (unibyte-display coding-system)))))
+
 (defun standard-display-european-internal ()
   ;; Actually set up direct output of non-ASCII characters.
   (standard-display-8bit (if (eq window-system 'pc) 128 160) 255)