diff options
| author | Dan Nicolaescu | 2009-11-11 06:27:23 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-11-11 06:27:23 +0000 |
| commit | 3b6acc72ca05cc1c0fef190f3954ff82a485e62d (patch) | |
| tree | 866b97b506ed215cd3329ff450658d66aaa7a6d6 | |
| parent | ebfa10d32f11aeb2470d99757d013bc0cc4df7d4 (diff) | |
| download | emacs-3b6acc72ca05cc1c0fef190f3954ff82a485e62d.tar.gz emacs-3b6acc72ca05cc1c0fef190f3954ff82a485e62d.zip | |
(define-charset): Purecopy props.
(load-with-code-conversion): Purecopy doc string and file name.
(put-charset-property): Purecopy strings.
(auto-coding-alist, auto-coding-regexp-alist): Purecopy initial value.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/international/mule.el | 18 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0bd7a705ea6..8cb2f2121cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2009-11-11 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2009-11-11 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * international/mule.el (define-charset): Purecopy props. | ||
| 4 | (load-with-code-conversion): Purecopy doc string and file name. | ||
| 5 | (put-charset-property): Purecopy strings. | ||
| 6 | (auto-coding-alist, auto-coding-regexp-alist): Purecopy initial value. | ||
| 7 | |||
| 3 | * international/mule-cmds.el (register-input-method); Purecopy arguments. | 8 | * international/mule-cmds.el (register-input-method); Purecopy arguments. |
| 4 | (define-char-code-property): Correctly purecopy the table. | 9 | (define-char-code-property): Correctly purecopy the table. |
| 5 | 10 | ||
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 9be8e2fee43..c4e8f06f5e0 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -264,7 +264,7 @@ attribute." | |||
| 264 | (aset emacs-mule-charset-table emacs-mule-id name))) | 264 | (aset emacs-mule-charset-table emacs-mule-id name))) |
| 265 | 265 | ||
| 266 | (dolist (slot attrs) | 266 | (dolist (slot attrs) |
| 267 | (setcdr slot (plist-get props (car slot)))) | 267 | (setcdr slot (purecopy (plist-get props (car slot))))) |
| 268 | 268 | ||
| 269 | ;; Make sure that the value of :code-space is a vector of 8 | 269 | ;; Make sure that the value of :code-space is a vector of 8 |
| 270 | ;; elements. | 270 | ;; elements. |
| @@ -277,7 +277,7 @@ attribute." | |||
| 277 | 277 | ||
| 278 | ;; Add :name and :docstring properties to PROPS. | 278 | ;; Add :name and :docstring properties to PROPS. |
| 279 | (setq props | 279 | (setq props |
| 280 | (cons :name (cons name (cons :docstring (cons docstring props))))) | 280 | (cons :name (cons name (cons :docstring (cons (purecopy docstring) props))))) |
| 281 | (or (plist-get props :short-name) | 281 | (or (plist-get props :short-name) |
| 282 | (plist-put props :short-name (symbol-name name))) | 282 | (plist-put props :short-name (symbol-name name))) |
| 283 | (or (plist-get props :long-name) | 283 | (or (plist-get props :long-name) |
| @@ -317,7 +317,7 @@ Return t if file exists." | |||
| 317 | (message "Loading %s (source)..." file) | 317 | (message "Loading %s (source)..." file) |
| 318 | (message "Loading %s..." file))) | 318 | (message "Loading %s..." file))) |
| 319 | (when purify-flag | 319 | (when purify-flag |
| 320 | (push file preloaded-file-list)) | 320 | (push (purecopy file) preloaded-file-list)) |
| 321 | (unwind-protect | 321 | (unwind-protect |
| 322 | (let ((load-file-name fullname) | 322 | (let ((load-file-name fullname) |
| 323 | (set-auto-coding-for-load t) | 323 | (set-auto-coding-for-load t) |
| @@ -433,7 +433,10 @@ This is the last value stored with | |||
| 433 | "Set CHARSETS's PROPNAME property to value VALUE. | 433 | "Set CHARSETS's PROPNAME property to value VALUE. |
| 434 | It can be retrieved with `(get-charset-property CHARSET PROPNAME)'." | 434 | It can be retrieved with `(get-charset-property CHARSET PROPNAME)'." |
| 435 | (set-charset-plist charset | 435 | (set-charset-plist charset |
| 436 | (plist-put (charset-plist charset) propname value))) | 436 | (plist-put (charset-plist charset) propname |
| 437 | (if (stringp value) | ||
| 438 | (purecopy value) | ||
| 439 | value)))) | ||
| 437 | 440 | ||
| 438 | (defun charset-description (charset) | 441 | (defun charset-description (charset) |
| 439 | "Return description string of CHARSET." | 442 | "Return description string of CHARSET." |
| @@ -1620,7 +1623,7 @@ and convert it in the temporary buffer. Otherwise, convert in-place." | |||
| 1620 | (defcustom auto-coding-alist | 1623 | (defcustom auto-coding-alist |
| 1621 | ;; .exe and .EXE are added to support archive-mode looking at DOS | 1624 | ;; .exe and .EXE are added to support archive-mode looking at DOS |
| 1622 | ;; self-extracting exe archives. | 1625 | ;; self-extracting exe archives. |
| 1623 | '(("\\.\\(\ | 1626 | (purecopy '(("\\.\\(\ |
| 1624 | arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|\ | 1627 | arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|\ |
| 1625 | ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" | 1628 | ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" |
| 1626 | . no-conversion-multibyte) | 1629 | . no-conversion-multibyte) |
| @@ -1629,7 +1632,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" | |||
| 1629 | ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) | 1632 | ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) |
| 1630 | ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) | 1633 | ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) |
| 1631 | ("\\.pdf\\'" . no-conversion) | 1634 | ("\\.pdf\\'" . no-conversion) |
| 1632 | ("/#[^/]+#\\'" . emacs-mule)) | 1635 | ("/#[^/]+#\\'" . emacs-mule))) |
| 1633 | "Alist of filename patterns vs corresponding coding systems. | 1636 | "Alist of filename patterns vs corresponding coding systems. |
| 1634 | Each element looks like (REGEXP . CODING-SYSTEM). | 1637 | Each element looks like (REGEXP . CODING-SYSTEM). |
| 1635 | A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading. | 1638 | A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading. |
| @@ -1643,11 +1646,12 @@ and the contents of `file-coding-system-alist'." | |||
| 1643 | (symbol :tag "Coding system")))) | 1646 | (symbol :tag "Coding system")))) |
| 1644 | 1647 | ||
| 1645 | (defcustom auto-coding-regexp-alist | 1648 | (defcustom auto-coding-regexp-alist |
| 1649 | (purecopy | ||
| 1646 | '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion) | 1650 | '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion) |
| 1647 | ("\\`\xFE\xFF" . utf-16be-with-signature) | 1651 | ("\\`\xFE\xFF" . utf-16be-with-signature) |
| 1648 | ("\\`\xFF\xFE" . utf-16le-with-signature) | 1652 | ("\\`\xFF\xFE" . utf-16le-with-signature) |
| 1649 | ("\\`\xEF\xBB\xBF" . utf-8-with-signature) | 1653 | ("\\`\xEF\xBB\xBF" . utf-8-with-signature) |
| 1650 | ("\\`;ELC\024\0\0\0" . emacs-mule)) ; Emacs 20-compiled | 1654 | ("\\`;ELC\024\0\0\0" . emacs-mule))) ; Emacs 20-compiled |
| 1651 | "Alist of patterns vs corresponding coding systems. | 1655 | "Alist of patterns vs corresponding coding systems. |
| 1652 | Each element looks like (REGEXP . CODING-SYSTEM). | 1656 | Each element looks like (REGEXP . CODING-SYSTEM). |
| 1653 | A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. | 1657 | A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. |