* keymap.c (Fmake_sparse_keymap): Purecopy the name.
[bpt/emacs.git] / lisp / international / mule-cmds.el
index 0064f40..d98053d 100644 (file)
@@ -1174,8 +1174,10 @@ where to put this language environment in the
 Describe Language Environment and Set Language Environment menus.
 For example, (\"European\") means to put this language environment
 in the European submenu in each of those two menus."
-  (if (symbolp lang-env)
-      (setq lang-env (symbol-name lang-env)))
+  (cond ((symbolp lang-env)
+        (setq lang-env (symbol-name lang-env)))
+       ((stringp lang-env)
+        (setq lang-env (purecopy lang-env))))
   (let ((describe-map describe-language-environment-map)
        (setup-map setup-language-environment-map))
     (if parents
@@ -1249,7 +1251,7 @@ This file contains a list of libraries of Emacs input methods (LEIM)
 in the format of Lisp expression for registering each input method.
 Emacs loads this file at startup time.")
 
-(defvar leim-list-header (format
+(defconst leim-list-header (format
 ";;; %s -- list of LEIM (Library of Emacs Input Method) -*-coding: utf-8;-*-
 ;;
 ;; This file is automatically generated.
@@ -1272,7 +1274,7 @@ Emacs loads this file at startup time.")
                                 leim-list-file-name)
   "Header to be inserted in LEIM list file.")
 
-(defvar leim-list-entry-regexp "^(register-input-method"
+(defconst leim-list-entry-regexp "^(register-input-method"
   "Regexp matching head of each entry in LEIM list file.
 See also the variable `leim-list-header'.")
 
@@ -1865,7 +1867,7 @@ specifies the character set for the major languages of Western Europe."
   (force-mode-line-update t))
 
 (define-widget 'charset 'symbol
-  "An Emacs charset."
+  (purecopy "An Emacs charset.")
   :tag "Charset"
   :complete-function (lambda ()
                       (interactive)
@@ -2745,12 +2747,13 @@ See also the documentation of `get-char-code-property' and
          (error "Invalid char-table: %s" table))
     (or (stringp table)
        (error "Not a char-table nor a file name: %s" table)))
+  (if (stringp table) (purecopy table))
   (let ((slot (assq name char-code-property-alist)))
     (if slot
        (setcdr slot table)
       (setq char-code-property-alist
            (cons (cons name table) char-code-property-alist))))
-  (put name 'char-code-property-documentation docstring))
+  (put name 'char-code-property-documentation (purecopy docstring)))
 
 (defvar char-code-property-table
   (make-char-table 'char-code-property-table)