changeset 22200:a0d60a6c87da

(register-input-method): Rename arg ENV to LANG-ENV. Fix previous change. (set-language-info): Delete args describe-map and setup-map. Don't set up menus at all. (set-language-info-alist): Set up menus here. (setup-specified-language-environment): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 May 1998 20:05:36 +0000
parents edca9002c740
children 40b715281ea5
files lisp/international/mule-cmds.el
diffstat 1 files changed, 21 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Sat May 23 20:02:01 1998 +0000
+++ b/lisp/international/mule-cmds.el	Sat May 23 20:05:36 1998 +0000
@@ -419,8 +419,7 @@
     (if lang-slot
 	(cdr (assq key (cdr lang-slot))))))
 
-(defun set-language-info (lang-env key info
-				   &optional describe-map setup-map)
+(defun set-language-info (lang-env key info)
   "Modify part of the definition of language environment LANG-ENV.
 Specifically, this stores the information INFO under KEY
 in the definition of this language environment.
@@ -428,11 +427,7 @@
 INFO is the value for that information.
 
 For a list of useful values for KEY and their meanings,
-see `language-info-alist'.
-
-Optional 4th and 5th args DESCRIBE-MAP and SETUP-MAP are keymaps to
-register LANG-ENV in the menus `Mule'->`Describe Language
-Environment' and `Mule'->`Setup Language Environment', respectively."
+see `language-info-alist'."
   (if (symbolp lang-env)
       (setq lang-env (symbol-name lang-env)))
   (let (lang-slot key-slot)
@@ -445,16 +440,7 @@
 	(progn
 	  (setq key-slot (list key))
 	  (setcdr lang-slot (cons key-slot (cdr lang-slot)))))
-    ;; Setup menu.
-    (cond ((eq key 'documentation)
-	   (define-key-after describe-map (vector (intern lang-env))
-	     (cons lang-env 'describe-specified-language-support) t))
-	  ((eq key 'setup-function)
-	   (define-key-after setup-map (vector (intern lang-env))
-	     (cons lang-env 'setup-specified-language-environment) t)))
-
-    (setcdr key-slot info)
-    ))
+    (setcdr key-slot info)))
 
 (defun set-language-info-alist (lang-env alist &optional parents)
   "Store ALIST as the definition of language environment LANG-ENV.
@@ -496,9 +482,19 @@
 		    (cons parent map) t)))
 	    (setq setup-map (symbol-value map))
 	    (setq l (cdr l)))))
+
+    ;; Set up menu items for this language env.
+    (let ((doc (assq 'documentation alist))
+	  (setup-function (assq 'setup-function alist)))
+      (when doc
+	(define-key-after describe-map (vector (intern lang-env))
+	  (cons lang-env 'describe-specified-language-support) t))
+      (when setup-function
+	(define-key-after setup-map (vector (intern lang-env))
+	  (cons lang-env 'setup-specified-language-environment) t)))
+
     (while alist
-      (set-language-info lang-env (car (car alist)) (cdr (car alist))
-			 describe-map setup-map)
+      (set-language-info lang-env (car (car alist)) (cdr (car alist)))
       (setq alist (cdr alist)))))
 
 (defun read-language-name (key prompt &optional default)
@@ -604,9 +600,9 @@
    (INPUT-METHOD LANGUAGE-ENV ACTIVATE-FUNC TITLE DESCRIPTION ARGS...)
 See the function `register-input-method' for the meanings of the elements.")
 
-(defun register-input-method (input-method env &rest args)
+(defun register-input-method (input-method lang-env &rest args)
   "Register INPUT-METHOD as an input method for language environment ENV.
-INPUT-METHOD and ENV are symbols or strings.
+INPUT-METHOD and LANG-ENV are symbols or strings.
 
 The remaining arguments are:
 	ACTIVATE-FUNC, TITLE, DESCRIPTION, and ARGS...
@@ -615,11 +611,11 @@
 DESCRIPTION is a string describing this method and what it is good for.
 The ARGS, if any, are passed as arguments to ACTIVATE-FUNC.
 All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS."
-  (if (symbolp language-name)
-      (setq language-name (symbol-name language-name)))
+  (if (symbolp lang-env)
+      (setq lang-env (symbol-name lang-env)))
   (if (symbolp input-method)
       (setq input-method (symbol-name input-method)))
-  (let ((info (cons language-name args))
+  (let ((info (cons lang-env args))
 	(slot (assoc input-method input-method-alist)))
     (if slot
 	(setcdr slot info)
@@ -852,7 +848,7 @@
 `set-language-environment-hook' (which-see).")
 
 (defun setup-specified-language-environment ()
-  "Set up multi-lingual environment convenient for the specified language."
+  "Switch to a specified language environment."
   (interactive)
   (let (language-name)
     (if (and (symbolp last-command-event)