;; Setup font-encoding-alist for all known encodings.
(setq font-encoding-alist
- (mapcar (lambda (arg)
- (cons (purecopy (car arg)) (cdr arg)))
'(("iso8859-1$" . iso-8859-1)
("iso8859-2$" . iso-8859-2)
("iso8859-3$" . iso-8859-3)
("mulelao-1" . mule-lao)
("muletibetan-2" . tibetan)
("muletibetan-0" . tibetan)
- ("muletibetan-1" . tibetan-1-column))))
+ ("muletibetan-1" . tibetan-1-column)))
(defvar font-encoding-charset-alist)
;; Setting for suppressing XLoadQueryFont on big fonts.
(setq x-pixel-size-width-font-regexp
- (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5"))
+ "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5")
;; These fonts require vertical centering.
(setq vertical-centering-font-regexp
- (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5"))
+ "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5")
(put 'vertical-centering-font-regexp 'standard-value
(list vertical-centering-font-regexp))
;; CDAC fonts are actually smaller than their design sizes.
(setq face-font-rescale-alist
- (list (cons (purecopy "-cdac$") 1.3)))
+ (list '("-cdac$" . 1.3)))
(defvar x-font-name-charset-alist nil
"This variable has no meaning starting with Emacs 22.1.")
;; specified here because FAMILY of those fonts are not "fixed" in
;; many cases.
(defvar standard-fontset-spec
- (purecopy "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard")
+ "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard"
"String of fontset spec of the standard fontset.
You have the biggest chance to display international characters
with correct glyphs by using the standard fontset.
;;;###autoload
(defcustom latex-inputenc-coding-alist
- (purecopy
'(("ansinew" . windows-1252) ; MS Windows ANSI encoding, extension of Latin-1
("applemac" . mac-roman)
("ascii" . us-ascii)
;; ("macce" . undecided) ; Apple Central European
("next" . next) ; The Next encoding
("utf8" . utf-8)
- ("utf8x" . utf-8))) ; used by the Unicode LaTeX package
+ ("utf8x" . utf-8)) ; used by the Unicode LaTeX package
"Mapping from LaTeX encodings in \"inputenc.sty\" to Emacs coding systems.
LaTeX encodings are specified with \"\\usepackage[encoding]{inputenc}\".
Used by the function `latexenc-find-file-coding-system'."
;;; Mule related hyperlinks.
(defconst help-xref-mule-regexp-template
- (purecopy (concat "\\(\\<\\("
- "\\(coding system\\)\\|"
- "\\(input method\\)\\|"
- "\\(character set\\)\\|"
- "\\(charset\\)"
- "\\)\\s-+\\)?"
- ;; Note starting with word-syntax character:
- "['`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]")))
+ (concat "\\(\\<\\("
+ "\\(coding system\\)\\|"
+ "\\(input method\\)\\|"
+ "\\(character set\\)\\|"
+ "\\(charset\\)"
+ "\\)\\s-+\\)?"
+ ;; Note starting with word-syntax character:
+ "['`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]"))
(defun coding-system-change-eol-conversion (coding-system eol-type)
"Return a coding system which differs from CODING-SYSTEM in EOL conversion.
(progn
(setq key-slot (list key))
(setcdr lang-slot (cons key-slot (cdr lang-slot)))))
- (setcdr key-slot (purecopy info))
+ (setcdr key-slot info)
;; Update the custom-type of `current-language-environment'.
(put 'current-language-environment 'custom-type
(cons 'choice (mapcar
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."
- (cond ((symbolp lang-env)
- (setq lang-env (symbol-name lang-env)))
- ((stringp lang-env)
- (setq lang-env (purecopy lang-env))))
+ (when (symbolp lang-env)
+ (setq lang-env (symbol-name lang-env)))
(if parents
(while parents
(let (describe-map setup-map parent-symbol parent prompt)
these duplicated values to show some information about input methods
without loading the relevant Quail packages.
\n(fn INPUT-METHOD LANG-ENV ACTIVATE-FUNC TITLE DESCRIPTION &rest ARGS)"
- (setq lang-env (if (symbolp lang-env)
- (symbol-name lang-env)
- (purecopy lang-env)))
- (setq input-method (if (symbolp input-method)
- (symbol-name input-method)
- (purecopy input-method)))
- (setq args (mapcar #'purecopy args))
+
+ (when (symbolp lang-env)
+ (setq lang-env (symbol-name lang-env)))
+ (when (symbolp input-method)
+ (setq input-method (symbol-name input-method)))
(let ((info (cons lang-env args))
(slot (assoc input-method input-method-alist)))
(if slot
(defvar locale-translation-file-name nil
"File name for the system's file of locale-name aliases, or nil if none.")
-;; The following definitions might as well be marked as constants and
-;; purecopied, since they're normally used on startup, and probably
-;; should reflect the facilities of the base Emacs.
(defconst locale-language-names
- (purecopy
- '(
+ '(
;; Locale names of the form LANGUAGE[_TERRITORY][.CODESET][@MODIFIER]
;; as specified in the Single Unix Spec, Version 2.
;; LANGUAGE is a language code taken from ISO 639:1988 (E/F)
; mwk MS-Windows Mohawk (Canada)
("uig" . "UTF-8") ; MS-Windows Uighur
("kin" . "UTF-8") ; MS-Windows Kinyarwanda
- ))
+ )
"Alist of locale regexps vs the corresponding languages and coding systems.
Each element has this form:
(LOCALE-REGEXP LANG-ENV CODING-SYSTEM)
specific encoding such as \"Latin-1\" and \"UTF-8\".")
(defconst locale-charset-language-names
- (purecopy
- '((".*8859[-_]?1\\>" . "Latin-1")
- (".*8859[-_]?2\\>" . "Latin-2")
- (".*8859[-_]?3\\>" . "Latin-3")
- (".*8859[-_]?4\\>" . "Latin-4")
- (".*8859[-_]?9\\>" . "Latin-5")
- (".*8859[-_]?14\\>" . "Latin-8")
- (".*8859[-_]?15\\>" . "Latin-9")
- (".*utf\\(?:-?8\\)?\\>" . "UTF-8")
- ;; utf-8@euro exists, so put this last. (@euro really specifies
- ;; the currency, rather than the charset.)
- (".*@euro\\>" . "Latin-9")))
+ '((".*8859[-_]?1\\>" . "Latin-1")
+ (".*8859[-_]?2\\>" . "Latin-2")
+ (".*8859[-_]?3\\>" . "Latin-3")
+ (".*8859[-_]?4\\>" . "Latin-4")
+ (".*8859[-_]?9\\>" . "Latin-5")
+ (".*8859[-_]?14\\>" . "Latin-8")
+ (".*8859[-_]?15\\>" . "Latin-9")
+ (".*utf\\(?:-?8\\)?\\>" . "UTF-8")
+ ;; utf-8@euro exists, so put this last. (@euro really specifies
+ ;; the currency, rather than the charset.)
+ (".*@euro\\>" . "Latin-9"))
"List of pairs of locale regexps and charset language names.
The first element whose locale regexp matches the start of a downcased locale
specifies the language name whose charset corresponds to that locale.
`locale-language-names'.")
(defconst locale-preferred-coding-systems
- (purecopy
- '((".*8859[-_]?1\\>" . iso-8859-1)
- (".*8859[-_]?2\\>" . iso-8859-2)
- (".*8859[-_]?3\\>" . iso-8859-3)
- (".*8859[-_]?4\\>" . iso-8859-4)
- (".*8859[-_]?9\\>" . iso-8859-9)
- (".*8859[-_]?14\\>" . iso-8859-14)
- (".*8859[-_]?15\\>" . iso-8859-15)
- (".*utf\\(?:-?8\\)?" . utf-8)
- ;; utf-8@euro exists, so put this after utf-8. (@euro really
- ;; specifies the currency, rather than the charset.)
- (".*@euro" . iso-8859-15)
- ("koi8-?r" . koi8-r)
- ("koi8-?u" . koi8-u)
- ("tcvn" . tcvn)
- ("big5[-_]?hkscs" . big5-hkscs)
- ("big5" . big5)
- ("euc-?tw" . euc-tw)
- ("euc-?cn" . euc-cn)
- ("gb2312" . gb2312)
- ("gbk" . gbk)
- ("gb18030" . gb18030)
- ("ja.*[._]euc" . japanese-iso-8bit)
- ("ja.*[._]jis7" . iso-2022-jp)
- ("ja.*[._]pck" . japanese-shift-jis)
- ("ja.*[._]sjis" . japanese-shift-jis)
- ("jpn" . japanese-shift-jis) ; MS-Windows uses this.
- ))
+ '((".*8859[-_]?1\\>" . iso-8859-1)
+ (".*8859[-_]?2\\>" . iso-8859-2)
+ (".*8859[-_]?3\\>" . iso-8859-3)
+ (".*8859[-_]?4\\>" . iso-8859-4)
+ (".*8859[-_]?9\\>" . iso-8859-9)
+ (".*8859[-_]?14\\>" . iso-8859-14)
+ (".*8859[-_]?15\\>" . iso-8859-15)
+ (".*utf\\(?:-?8\\)?" . utf-8)
+ ;; utf-8@euro exists, so put this after utf-8. (@euro really
+ ;; specifies the currency, rather than the charset.)
+ (".*@euro" . iso-8859-15)
+ ("koi8-?r" . koi8-r)
+ ("koi8-?u" . koi8-u)
+ ("tcvn" . tcvn)
+ ("big5[-_]?hkscs" . big5-hkscs)
+ ("big5" . big5)
+ ("euc-?tw" . euc-tw)
+ ("euc-?cn" . euc-cn)
+ ("gb2312" . gb2312)
+ ("gbk" . gbk)
+ ("gb18030" . gb18030)
+ ("ja.*[._]euc" . japanese-iso-8bit)
+ ("ja.*[._]jis7" . iso-2022-jp)
+ ("ja.*[._]pck" . japanese-shift-jis)
+ ("ja.*[._]sjis" . japanese-shift-jis)
+ ("jpn" . japanese-shift-jis) ; MS-Windows uses this.
+ )
"List of pairs of locale regexps and preferred coding systems.
The first element whose locale regexp matches the start of a downcased locale
specifies the coding system to prefer when using that locale.
(error "Invalid char-table: %s" table))
(or (stringp table)
(error "Not a char-table nor a file name: %s" table)))
- (if (stringp table) (setq table (purecopy table)))
(if (and (stringp table)
(char-table-p (alist-get name char-code-property-alist)))
;; The table is already setup and we're apparently trying to
;; Just skip it, in order to work around a recursive load (bug#52945).
nil
(alist-set name char-code-property-alist table)
- (put name 'char-code-property-documentation (purecopy docstring))))
+ (put name 'char-code-property-documentation docstring)))
(defvar char-code-property-table
(make-char-table 'char-code-property-table)
;; Tar files are not decoded at all, but we treat them as raw bytes.
(setq file-coding-system-alist
- (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
'(("\\.elc\\'" . utf-8-emacs)
("\\.el\\'" . prefer-utf-8)
("\\.utf\\(-8\\)?\\'" . utf-8)
("\\.tar\\'" . (no-conversion . no-conversion))
( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system)
- ("" . (undecided . nil)))))
+ ("" . (undecided . nil))))
\f
;;; Setting coding categories and their priorities.
;;; CHARSET
(define-button-type 'sort-listed-character-sets
- 'help-echo (purecopy "mouse-2, RET: sort on this column")
+ 'help-echo "mouse-2, RET: sort on this column"
'face 'bold
'action (lambda (button)
(sort-listed-character-sets (button-get button 'sort-key))))
(aset emacs-mule-charset-table emacs-mule-id name)))
(dolist (slot attrs)
- (setcdr slot (purecopy (plist-get props (car slot)))))
+ (setcdr slot (plist-get props (car slot))))
;; Make sure that the value of :code-space is a vector of 8
;; elements.
;; Add :name and :docstring properties to PROPS.
(setq props
- (cons :name (cons name (cons :docstring (cons (purecopy docstring) props)))))
+ (cons :name (cons name (cons :docstring (cons docstring props)))))
(or (plist-get props :short-name)
(plist-put props :short-name (symbol-name name)))
(or (plist-get props :long-name)
(plist-put props :long-name (plist-get props :short-name)))
(plist-put props :base name)
- ;; We can probably get a worthwhile amount in purespace.
- (setq props
- (mapcar (lambda (elt)
- (if (stringp elt)
- (purecopy elt)
- elt))
- props))
(setcdr (assq :plist attrs) props)
(apply 'define-charset-internal name (mapcar 'cdr attrs))))
(message "Loading %s (source)..." file)
(message "Loading %s..." file)))
(when purify-flag
- (push (purecopy file) preloaded-file-list))
+ (push file preloaded-file-list))
(unwind-protect
(let ((load-true-file-name fullname)
(load-file-name fullname)
"Set CHARSETS's PROPNAME property to value VALUE.
It can be retrieved with `(get-charset-property CHARSET PROPNAME)'."
(set-charset-plist charset
- (plist-put (charset-plist charset) propname
- (if (stringp value)
- (purecopy value)
- value))))
+ (plist-put (charset-plist charset) propname value)))
(defun charset-description (charset)
"Return description string of CHARSET."
;; Add :name and :docstring properties to PROPS.
(setq props
- (cons :name (cons name (cons :docstring (cons (purecopy docstring)
- props)))))
+ (cons :name (cons name (cons :docstring (cons docstring props)))))
(setcdr (assq :plist common-attrs) props)
(apply #'define-coding-system-internal
name (mapcar #'cdr (append common-attrs spec-attrs)))))
;;; X selections
(defvar ctext-non-standard-encodings-alist
- (mapcar 'purecopy
'(("big5-0" big5 2 big5)
("ISO8859-14" iso-8859-14 1 latin-iso8859-14)
("ISO8859-15" iso-8859-15 1 latin-iso8859-15)
("gbk-0" gbk 2 chinese-gbk)
("koi8-r" koi8-r 1 koi8-r)
- ("microsoft-cp1251" windows-1251 1 windows-1251)))
+ ("microsoft-cp1251" windows-1251 1 windows-1251))
"Alist of non-standard encoding names vs the corresponding usages in CTEXT.
It controls how extended segments of a compound text are handled
`ctext-non-standard-encodings-alist' (which see).")
(defvar ctext-non-standard-encodings-regexp
- (purecopy
(string-to-multibyte
(concat
;; For non-standard encodings.
"\\(\e%/[0-4][\200-\377][\200-\377]\\([^\002]+\\)\002\\)"
"\\|"
;; For UTF-8 encoding.
- "\\(\e%G[^\e]*\e%@\\)"))))
+ "\\(\e%G[^\e]*\e%@\\)")))
;; Functions to support "Non-Standard Character Set Encodings" defined
;; by the COMPOUND-TEXT spec. They also support "The UTF-8 encoding"
(defcustom auto-coding-alist
;; .exe and .EXE are added to support archive-mode looking at DOS
;; self-extracting exe archives.
- (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
'(("\\.\\(\
arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|squashfs\\|\
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\|SQUASHFS\\)\\'"
("\\.\\(gz\\|Z\\|bz\\|bz2\\|xz\\|gpg\\)\\'" . no-conversion)
("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
("\\.pdf\\'" . no-conversion)
- ("/#[^/]+#\\'" . utf-8-emacs-unix)))
+ ("/#[^/]+#\\'" . utf-8-emacs-unix))
"Alist of filename patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).
A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading.
(symbol :tag "Coding system"))))
(defcustom auto-coding-regexp-alist
- (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
'(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
("\\`\xFE\xFF" . utf-16be-with-signature)
("\\`\xFF\xFE" . utf-16le-with-signature)
("\\`\xEF\xBB\xBF" . utf-8-with-signature)
- ("\\`;ELC\024\0\0\0" . emacs-mule))) ; Emacs 20-compiled
+ ("\\`;ELC\024\0\0\0" . emacs-mule)) ; Emacs 20-compiled
"Alist of patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).
A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.
(help-setup-xref `(quail-keyboard-layout-button ,layout)
nil)
(quail-show-keyboard-layout layout))
- 'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
+ 'help-echo "mouse-2, RET: show keyboard layout")
(define-button-type 'quail-keyboard-customize-button
:supertype 'help-customize-variable
- 'help-echo (purecopy "mouse-2, RET: customize keyboard layout"))
+ 'help-echo "mouse-2, RET: customize keyboard layout")
(defun quail-help (&optional package)
"Show brief description of the current Quail package.