From 82480d7cf15989ab5d7d10983459360e8e20eb76 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 9 Dec 2024 21:26:25 +0100 Subject: [PATCH] Delete remaining calls to purecopy * lisp/button.el (default-button): * lisp/calendar/holidays.el (holiday-solar-holidays) (holiday-bahai-holidays, holiday-islamic-holidays) (holiday-christian-holidays, holiday-hebrew-holidays) (holiday-oriental-holidays, holiday-general-holidays): * lisp/comint.el (comint-file-name-prefix): * lisp/composite.el (unicode-category-table): * lisp/cus-face.el (custom-declare-face): * lisp/custom.el (custom-add-load, custom-add-package-version) (custom-add-version, custom-add-link, custom-declare-group) (custom-declare-variable): * lisp/dired.el (dired-listing-switches): * lisp/epa-hook.el (epa-file-name-regexp): * lisp/faces.el (x-font-regexp, x-font-regexp-head) (x-font-regexp-slant, x-font-regexp-weight, ) (set-face-attribute, set-face-documentation, face-x-resources) (face-font-registry-alternatives, face-font-family-alternatives) (term-file-prefix): * lisp/find-file.el (ff-special-constructs): * lisp/format.el (format-alist): * lisp/help.el (help-for-help): * lisp/image-file.el (image-file-name-extensions): * lisp/info.el: * lisp/isearch.el (isearch-help-for-help-internal) (search-whitespace-regexp): * lisp/jka-cmpr-hook.el (jka-compr-load-suffixes) (jka-compr-mode-alist-additions) (jka-compr-compression-info-list, jka-compr-build-file-regexp): * lisp/language/ethiopic.el (font-ccl-encoder-alist): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/language/tibetan.el (tibetan-precomposition-rule-regexp) (tibetan-precomposed-regexp): * lisp/locate.el (locate-ls-subdir-switches): * lisp/lpr.el (lpr-command): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-secondary-file-directory, rmail-highlighted-headers) (rmail-ignored-headers, rmail-spool-directory, rmail-file-name): * lisp/mail/sendmail.el (mail-default-directory) (mail-signature-file, mail-citation-prefix-regexp) (mail-personal-alias-file, mail-header-separator): * lisp/menu-bar.el (yank-menu): * lisp/net/eudc.el (eudc-tools-menu): * lisp/newcomment.el (comment-padding, comment-end): * lisp/obsolete/autoload.el (autoload-generate-file-autoloads): * lisp/progmodes/hideshow.el (hs-special-modes-alist): * lisp/ps-print.el (ps-page-dimensions-database): * lisp/rfn-eshadow.el (file-name-shadow-tty-properties): * lisp/shell.el (shell-dumb-shell-regexp): * lisp/simple.el (overwrite-mode-binary, overwrite-mode-textual) (mark-inactive, shell-command-switch) (next-error-overlay-arrow-position): * lisp/subr.el (package--builtin-versions, eval-after-load): * lisp/tab-bar.el ([tab-bar]): * lisp/term/pgtk-win.el (x-gtk-stock-map): * lisp/term/x-win.el (x-gtk-stock-map): * lisp/tool-bar.el ([tool-bar]): * lisp/widget.el (define-widget): Remove calls to purecopy. (cherry picked from commit d6aeb1a2606e1dece860f2b35623245d9eb865c3) --- lisp/button.el | 2 +- lisp/calendar/holidays.el | 21 ++++------- lisp/comint.el | 2 +- lisp/composite.el | 10 ++--- lisp/cus-face.el | 4 +- lisp/custom.el | 18 ++++----- lisp/dired.el | 2 +- lisp/epa-hook.el | 2 +- lisp/faces.el | 39 +++++++------------ lisp/format.el | 27 +++++++------ lisp/image-file.el | 2 +- lisp/info.el | 6 +-- lisp/isearch.el | 2 +- lisp/jka-cmpr-hook.el | 38 +++++++++---------- lisp/language/ethiopic.el | 2 +- lisp/language/korea-util.el | 6 +-- lisp/language/tibetan.el | 14 +++---- lisp/locate.el | 2 +- lisp/lpr.el | 3 +- lisp/mail/rmail.el | 14 +++---- lisp/mail/sendmail.el | 12 +++--- lisp/menu-bar.el | 4 +- lisp/net/eudc.el | 24 ++++++------ lisp/newcomment.el | 4 +- lisp/obsolete/autoload.el | 3 +- lisp/progmodes/hideshow.el | 3 +- lisp/ps-print.el | 75 ++++++++++++++++++------------------- lisp/rfn-eshadow.el | 2 +- lisp/shell.el | 2 +- lisp/simple.el | 10 ++--- lisp/subr.el | 4 +- lisp/tab-bar.el | 2 +- lisp/term/pgtk-win.el | 4 +- lisp/term/x-win.el | 4 +- lisp/tool-bar.el | 4 +- lisp/widget.el | 2 +- 36 files changed, 169 insertions(+), 206 deletions(-) diff --git a/lisp/button.el b/lisp/button.el index 5798c7dfe49..674de1bb4fa 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -97,7 +97,7 @@ Disabling the mode will remove all buttons in the current buffer." (put 'default-button 'type 'button) ;; `action' may be either a function to call, or a marker to go to. (put 'default-button 'action #'ignore) -(put 'default-button 'help-echo (purecopy "mouse-2, RET: Push this button")) +(put 'default-button 'help-echo "mouse-2, RET: Push this button") ;; Make overlay buttons go away if their underlying text is deleted. (put 'default-button 'evaporate t) ;; Prevent insertions adjacent to text-property buttons from diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 53229aa9e2e..54429cb3d60 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -44,7 +44,6 @@ ;;;###autoload (defcustom holiday-general-holidays - (mapcar 'purecopy '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Groundhog Day") @@ -61,7 +60,7 @@ (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") - (holiday-float 11 4 4 "Thanksgiving"))) + (holiday-float 11 4 4 "Thanksgiving")) "General holidays. Default value is for the United States. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -70,7 +69,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-oriental-holidays - (mapcar 'purecopy '((holiday-chinese-new-year) (if calendar-chinese-all-holidays-flag (append @@ -81,7 +79,7 @@ See the documentation for `calendar-holidays' for details." (holiday-chinese 8 15 "Mid-Autumn Festival") (holiday-chinese 9 9 "Double Ninth Festival") (holiday-chinese-winter-solstice) - )))) + ))) "Oriental holidays. See the documentation for `calendar-holidays' for details." :version "23.1" ; added more holidays @@ -107,14 +105,13 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-hebrew-holidays - (mapcar 'purecopy '((holiday-hebrew-passover) (holiday-hebrew-rosh-hashanah) (holiday-hebrew-hanukkah) (if calendar-hebrew-all-holidays-flag (append (holiday-hebrew-tisha-b-av) - (holiday-hebrew-misc))))) + (holiday-hebrew-misc)))) "Jewish holidays. See the documentation for `calendar-holidays' for details." :type 'sexp @@ -125,7 +122,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-christian-holidays - (mapcar 'purecopy '((holiday-easter-etc) ; respects calendar-christian-all-holidays-flag (holiday-fixed 12 25 "Christmas") (if calendar-christian-all-holidays-flag @@ -134,7 +130,7 @@ See the documentation for `calendar-holidays' for details." (holiday-julian 12 25 "Christmas (Julian calendar)") (holiday-greek-orthodox-easter) (holiday-fixed 8 15 "Assumption") - (holiday-advent 0 "Advent"))))) + (holiday-advent 0 "Advent")))) "Christian holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -143,7 +139,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-islamic-holidays - (mapcar 'purecopy '((holiday-islamic-new-year) (holiday-islamic 9 1 "Ramadan Begins") (if calendar-islamic-all-holidays-flag @@ -154,7 +149,7 @@ See the documentation for `calendar-holidays' for details." (holiday-islamic 8 15 "Shab-e-Bara't") (holiday-islamic 9 27 "Shab-e Qadr") (holiday-islamic 10 1 "Id-al-Fitr") - (holiday-islamic 12 10 "Id-al-Adha"))))) + (holiday-islamic 12 10 "Id-al-Adha")))) "Islamic holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -163,7 +158,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-bahai-holidays - (mapcar 'purecopy '((holiday-bahai-new-year) (holiday-bahai-ridvan) ; respects calendar-bahai-all-holidays-flag (holiday-fixed 5 23 "Declaration of the Báb") @@ -174,7 +168,7 @@ See the documentation for `calendar-holidays' for details." (if calendar-bahai-all-holidays-flag (append (holiday-fixed 11 26 "Day of the Covenant") - (holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá"))))) + (holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá")))) "Bahá’í holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -183,7 +177,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-solar-holidays - (mapcar 'purecopy '((solar-equinoxes-solstices) (holiday-sexp calendar-daylight-savings-starts (format "Daylight Saving Time Begins %s" @@ -194,7 +187,7 @@ See the documentation for `calendar-holidays' for details." (format "Daylight Saving Time Ends %s" (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) - calendar-daylight-time-zone-name))))) + calendar-daylight-time-zone-name)))) "Sun-related holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) diff --git a/lisp/comint.el b/lisp/comint.el index fc3ebeff516..0f99eaf1464 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3245,7 +3245,7 @@ Note that this applies to `comint-dynamic-complete-filename' only." :group 'comint-completion) ;;;###autoload -(defvar comint-file-name-prefix (purecopy "") +(defvar comint-file-name-prefix "" "Prefix prepended to absolute file names taken from process input. This is used by Comint's and shell's completion functions, and by shell's directory tracking functions.") diff --git a/lisp/composite.el b/lisp/composite.el index b4e40263d25..d0e5495e71e 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -747,7 +747,7 @@ All non-spacing characters have this function in ;; Allow for bootstrapping without uni-*.el. (when unicode-category-table - (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic] + (let ((elt `(["\\c.\\c^+" 1 compose-gstring-for-graphic] [nil 0 compose-gstring-for-graphic]))) (map-char-table #'(lambda (key val) @@ -756,7 +756,7 @@ All non-spacing characters have this function in unicode-category-table)) ;; for dotted-circle (aset composition-function-table #x25CC - `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])) + `([".\\c^" 0 compose-gstring-for-dotted-circle])) ;; For prettier display of fractions (set-char-table-range composition-function-table @@ -764,10 +764,10 @@ All non-spacing characters have this function in ;; We use font-shape-gstring so that if the font doesn't support ;; fractional display, the characters are shown separately, not as ;; a composed cluster. - (list (vector (purecopy "[1-9][0-9][0-9]\u2044[0-9]+") + (list (vector "[1-9][0-9][0-9]\u2044[0-9]+" 3 'font-shape-gstring) - (vector (purecopy "[1-9][0-9]\u2044[0-9]+") 2 'font-shape-gstring) - (vector (purecopy "[1-9]\u2044[0-9]+") 1 'font-shape-gstring)))) + (vector "[1-9][0-9]\u2044[0-9]+" 2 'font-shape-gstring) + (vector "[1-9]\u2044[0-9]+" 1 'font-shape-gstring)))) (defun compose-gstring-for-terminal (gstring _direction) "Compose glyph-string GSTRING for terminal display. diff --git a/lisp/cus-face.el b/lisp/cus-face.el index d06d041942e..ccaf43d772a 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -35,10 +35,10 @@ (not (documentation-stringp doc))) (error "Invalid (or missing) doc string %S" doc)) (unless (get face 'face-defface-spec) - (face-spec-set face (purecopy spec) 'face-defface-spec) + (face-spec-set face spec 'face-defface-spec) (push (cons 'defface face) current-load-list) (when doc - (set-face-documentation face (purecopy doc))) + (set-face-documentation face doc)) (custom-handle-all-keywords face args 'custom-face) (run-hooks 'custom-define-hook)) face) diff --git a/lisp/custom.el b/lisp/custom.el index a412600f4b0..9f260f8ef4a 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -166,7 +166,7 @@ not the default value itself. DEFAULT is stored as SYMBOL's standard value, in SYMBOL's property `standard-value'. At the same time, SYMBOL's property `force-value' is set to nil, as the value is no longer rogue." - (put symbol 'standard-value (purecopy (list default))) + (put symbol 'standard-value (list default)) ;; Maybe this option was rogue in an earlier version. It no longer is. (when (get symbol 'force-value) (put symbol 'force-value nil)) @@ -207,7 +207,7 @@ set to nil, as the value is no longer rogue." (when (memq value '(permanent permanent-only)) (put symbol 'permanent-local t))) ((eq keyword :type) - (put symbol 'custom-type (purecopy value))) + (put symbol 'custom-type value)) ((eq keyword :options) (if (get symbol 'custom-options) ;; Slow safe code to avoid duplicates. @@ -488,7 +488,7 @@ information." (setq members (cdr members))) (when doc ;; This text doesn't get into DOC. - (put symbol 'group-documentation (purecopy doc))) + (put symbol 'group-documentation doc)) (while args (let ((arg (car args))) (setq args (cdr args)) @@ -500,7 +500,7 @@ information." (error "Keyword %s is missing an argument" keyword)) (setq args (cdr args)) (cond ((eq keyword :prefix) - (put symbol 'custom-prefix (purecopy value))) + (put symbol 'custom-prefix value)) (t (custom-handle-keyword symbol keyword value 'custom-group)))))) @@ -586,8 +586,6 @@ Third argument TYPE is the custom option type." (defun custom-handle-keyword (symbol keyword value type) "For customization option SYMBOL, handle KEYWORD with VALUE. Fourth argument TYPE is the custom option type." - (if purify-flag - (setq value (purecopy value))) (cond ((eq keyword :group) (custom-add-to-group value symbol type)) ((eq keyword :version) @@ -640,22 +638,22 @@ For other custom types, this has no effect." "To the custom option SYMBOL add the link WIDGET." (let ((links (get symbol 'custom-links))) (unless (member widget links) - (put symbol 'custom-links (cons (purecopy widget) links))))) + (put symbol 'custom-links (cons widget links))))) (defun custom-add-version (symbol version) "To the custom option SYMBOL add the version VERSION." - (put symbol 'custom-version (purecopy version))) + (put symbol 'custom-version version)) (defun custom-add-package-version (symbol version) "To the custom option SYMBOL add the package version VERSION." - (put symbol 'custom-package-version (purecopy version))) + (put symbol 'custom-package-version version)) (defun custom-add-load (symbol load) "To the custom option SYMBOL add the dependency LOAD. LOAD should be either a library file name, or a feature name." (let ((loads (get symbol 'custom-loads))) (unless (member load loads) - (put symbol 'custom-loads (cons (purecopy load) loads))))) + (put symbol 'custom-loads (cons load loads))))) (defun custom-autoload (symbol load &optional noset) "Mark SYMBOL as autoloaded custom variable and add dependency LOAD. diff --git a/lisp/dired.el b/lisp/dired.el index d040540a49b..199244393d0 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -60,7 +60,7 @@ :group 'dired) ;;;###autoload -(defcustom dired-listing-switches (purecopy "-al") +(defcustom dired-listing-switches "-al" "Switches passed to `ls' for Dired. MUST contain the `l' option. May contain all other options that don't contradict `-l'; may contain even `F', `b', `i' and `s'. See also the variable diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index a9005e8d8d3..0f83528bae5 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -35,7 +35,7 @@ (if (fboundp 'epa-file-name-regexp-update) (epa-file-name-regexp-update))) -(defcustom epa-file-name-regexp (purecopy "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'") +(defcustom epa-file-name-regexp "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" "Regexp which matches filenames to be encrypted with GnuPG. If you set this outside Custom while epa-file is already enabled, diff --git a/lisp/faces.el b/lisp/faces.el index 4b708465bdf..020b043fd8b 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -25,7 +25,7 @@ ;;; Code: -(defcustom term-file-prefix (purecopy "term/") +(defcustom term-file-prefix "term/" "If non-nil, Emacs startup performs terminal-specific initialization. It does this by: (load (concat term-file-prefix (getenv \"TERM\"))) @@ -99,7 +99,6 @@ a font height that isn't optimal." ;; unavailable, and we fall back on the courier and helv families, ;; which are generally available. (defcustom face-font-family-alternatives - (mapcar (lambda (arg) (mapcar 'purecopy arg)) '(("Monospace" "Cascadia Code" "Lucida Console" "courier" "fixed") ;; Monospace Serif is an Emacs invention, intended to work around @@ -137,7 +136,7 @@ a font height that isn't optimal." ;; https://en.wikipedia.org/wiki/List_of_typefaces_included_with_Microsoft_Windows "Calibri" "Tahoma" "Lucida Sans Unicode" "helv" "helvetica" "arial" "fixed") - ("helv" "helvetica" "arial" "fixed"))) + ("helv" "helvetica" "arial" "fixed")) "Alist of alternative font family names. Each element has the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...). If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then @@ -152,7 +151,6 @@ ALTERNATIVE2 etc." ;; This is defined originally in xfaces.c. (defcustom face-font-registry-alternatives - (mapcar (lambda (arg) (mapcar 'purecopy arg)) (if (featurep 'w32) '(("iso8859-1" "ms-oemlatin") ("gb2312.1980" "gb2312" "gbk" "gb18030") @@ -162,7 +160,7 @@ ALTERNATIVE2 etc." '(("gb2312.1980" "gb2312.80&gb8565.88" "gbk" "gb18030") ("jisx0208.1990" "jisx0208.1983" "jisx0208.1978") ("ksc5601.1989" "ksx1001.1992" "ksc5601.1987") - ("muletibetan-2" "muletibetan-0")))) + ("muletibetan-2" "muletibetan-0"))) "Alist of alternative font registry names. Each element has the form (REGISTRY ALTERNATIVE1 ALTERNATIVE2 ...). If fonts of registry REGISTRY can be loaded, font selection @@ -354,11 +352,6 @@ is either `foreground-color', `background-color', or a keyword." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defcustom face-x-resources - (mapcar - (lambda (arg) - ;; FIXME; can we purecopy some of the conses too? - (cons (car arg) - (cons (purecopy (car (cdr arg))) (purecopy (cdr (cdr arg)))))) '((:family (".attributeFamily" . "Face.AttributeFamily")) (:foundry (".attributeFoundry" . "Face.AttributeFoundry")) (:width (".attributeWidth" . "Face.AttributeWidth")) @@ -381,7 +374,7 @@ is either `foreground-color', `background-color', or a keyword." (:bold (".attributeBold" . "Face.AttributeBold")) (:italic (".attributeItalic" . "Face.AttributeItalic")) (:font (".attributeFont" . "Face.AttributeFont")) - (:inherit (".attributeInherit" . "Face.AttributeInherit")))) + (:inherit (".attributeInherit" . "Face.AttributeInherit"))) "List of X resources and classes for face attributes. Each element has the form (ATTRIBUTE ENTRY1 ENTRY2...) where ATTRIBUTE is the name of a face attribute, and each ENTRY is a cons of the form @@ -664,7 +657,7 @@ If FACE is a face-alias, get the documentation for the target face." (defun set-face-documentation (face string) "Set the documentation string for FACE to STRING." ;; Perhaps the text should go in DOC. - (put face 'face-documentation (purecopy string))) + (put face 'face-documentation string)) (define-obsolete-function-alias 'face-doc-string #'face-documentation "29.1") @@ -863,7 +856,6 @@ setting `:weight' to `bold', and a value of t for `:italic' is equivalent to setting `:slant' to `italic'. But if `:weight' is specified in the face spec, `:bold' is ignored, and if `:slant' is specified, `:italic' is ignored." - (setq args (purecopy args)) (let ((where (if (null frame) 0 frame)) (spec args) family foundry orig-family orig-foundry) @@ -893,15 +885,13 @@ is specified, `:italic' is ignored." (setq family orig-family) (setq foundry orig-foundry))) (when (or (stringp family) (eq family 'unspecified)) - (internal-set-lisp-face-attribute face :family (purecopy family) - where)) + (internal-set-lisp-face-attribute face :family family where)) (when (or (stringp foundry) (eq foundry 'unspecified)) - (internal-set-lisp-face-attribute face :foundry (purecopy foundry) - where))) + (internal-set-lisp-face-attribute face :foundry foundry where))) (while args (unless (memq (car args) '(:family :foundry)) (internal-set-lisp-face-attribute face (car args) - (purecopy (cadr args)) + (cadr args) where)) (setq args (cddr args))))) @@ -3237,16 +3227,15 @@ This face is used by `show-paren-mode'." (encoding "[^-]+") ) (setq x-font-regexp - (purecopy (concat "\\`\\*?[-?*]" + (concat "\\`\\*?[-?*]" foundry - family - weight\? - slant\? - swidth - adstyle - pixelsize - pointsize - resx - resy - spacing - avgwidth - - registry - encoding "\\*?\\'" - ))) + registry - encoding "\\*?\\'")) (setq x-font-regexp-head - (purecopy (concat "\\`[-?*]" foundry - family - weight\? - slant\? - "\\([-*?]\\|\\'\\)"))) - (setq x-font-regexp-slant (purecopy (concat - slant -))) - (setq x-font-regexp-weight (purecopy (concat - weight -))) + (concat "\\`[-?*]" foundry - family - weight\? - slant\? + "\\([-*?]\\|\\'\\)")) + (setq x-font-regexp-slant (concat - slant -)) + (setq x-font-regexp-weight (concat - weight -)) nil) diff --git a/lisp/format.el b/lisp/format.el index 1f160ed6921..855d7a73f92 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -65,27 +65,26 @@ (put 'buffer-auto-save-file-format 'permanent-local t) (defvar format-alist - ;; FIXME: maybe each item can be purecopied instead of just the strings. - `((text/enriched ,(purecopy "Extended MIME text/enriched format.") - ,(purecopy "Content-[Tt]ype:[ \t]*text/enriched") + `((text/enriched "Extended MIME text/enriched format." + "Content-[Tt]ype:[ \t]*text/enriched" enriched-decode enriched-encode t enriched-mode) - (plain ,(purecopy "ISO 8859-1 standard format, no text properties.") + (plain "ISO 8859-1 standard format, no text properties." ;; Plain only exists so that there is an obvious neutral choice in ;; the completion list. nil nil nil nil nil) - (TeX ,(purecopy "TeX (encoding)") + (TeX "TeX (encoding)" nil iso-tex2iso iso-iso2tex t nil) - (gtex ,(purecopy "German TeX (encoding)") + (gtex "German TeX (encoding)" nil iso-gtex2iso iso-iso2gtex t nil) - (html ,(purecopy "HTML/SGML \"ISO 8879:1986//ENTITIES Added Latin 1//EN\" (encoding)") + (html "HTML/SGML \"ISO 8879:1986//ENTITIES Added Latin 1//EN\" (encoding)" nil iso-sgml2iso iso-iso2sgml t nil) - (rot13 ,(purecopy "rot13") + (rot13 "rot13" nil rot13-region rot13-region t nil) - (duden ,(purecopy "Duden Ersatzdarstellung") + (duden "Duden Ersatzdarstellung" nil ;; FROM-FN used to call the "diac" command which is not widely ;; available and apparently not under a free software license: @@ -93,14 +92,14 @@ ;; Reliable round-trip conversion is not possible anyway and ;; would be by heuristic method, so make it write-only for now. iso-cvt-write-only iso-iso2duden t nil) - (de646 ,(purecopy "German ASCII (ISO 646)") + (de646 "German ASCII (ISO 646)" nil - ,(purecopy "iconv -f iso646-de -t utf-8") - ,(purecopy "iconv -f utf-8 -t iso646-de") t nil) - (denet ,(purecopy "net German") + "iconv -f iso646-de -t utf-8" + "iconv -f utf-8 -t iso646-de" t nil) + (denet "net German" nil iso-german iso-cvt-read-only t nil) - (esnet ,(purecopy "net Spanish") + (esnet "net Spanish" nil iso-spanish iso-cvt-read-only t nil)) "List of information about understood file formats. diff --git a/lisp/image-file.el b/lisp/image-file.el index 5ae8fd49d4d..0f61d51b0f4 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -37,7 +37,7 @@ ;;;###autoload (defcustom image-file-name-extensions - (purecopy '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "webp")) + '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "webp") "A list of image-file filename extensions. Filenames having one of these extensions are considered image files, in addition to those matching `image-file-name-regexps'. diff --git a/lisp/info.el b/lisp/info.el index d2583983d1a..a15a40ea659 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -832,7 +832,7 @@ Select the window used, if it has been made." (select-window window)))) -;;;###autoload (put 'info 'info-file (purecopy "emacs")) +;;;###autoload (put 'info 'info-file "emacs") ;;;###autoload (defun info (&optional file-or-node buffer) "Enter Info, the documentation browser. @@ -4808,7 +4808,7 @@ in the first element of the returned list (which is treated specially in (cdr where)) where))) -;;;###autoload (put 'Info-goto-emacs-command-node 'info-file (purecopy "emacs")) +;;;###autoload (put 'Info-goto-emacs-command-node 'info-file "emacs") ;;;###autoload (defun Info-goto-emacs-command-node (command) "Go to the Info node in the Emacs manual for command COMMAND. @@ -4850,7 +4850,7 @@ COMMAND must be a symbol or string." (if (> num-matches 2) "them" "it"))))) (error "Couldn't find documentation for %s" command)))) -;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file (purecopy "emacs")) +;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file "emacs") ;;;###autoload (defun Info-goto-emacs-key-command-node (key) "Go to the node in the Emacs manual which describes the command bound to KEY. diff --git a/lisp/isearch.el b/lisp/isearch.el index 4f94b1fae07..f381223f26d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -115,7 +115,7 @@ is called to let you enter the search string, and RET terminates editing and does a nonincremental search.)" :type 'boolean) -(defcustom search-whitespace-regexp (purecopy "[ \t]+") +(defcustom search-whitespace-regexp "[ \t]+" "If non-nil, regular expression to match a sequence of whitespace chars. When you enter a space or spaces in the incremental search, it will match any sequence matched by this regexp. As an exception, diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el index d8244a675e1..e3f5eb7d998 100644 --- a/lisp/jka-cmpr-hook.el +++ b/lisp/jka-cmpr-hook.el @@ -78,19 +78,18 @@ Otherwise, it is nil.") (defun jka-compr-build-file-regexp () - (purecopy - (let ((re-anchored '()) - (re-free '())) - (dolist (e jka-compr-compression-info-list) - (let ((re (jka-compr-info-regexp e))) - (if (string-match "\\\\'\\'" re) - (push (substring re 0 (match-beginning 0)) re-anchored) - (push re re-free)))) - (concat - (if re-free (concat (mapconcat 'identity re-free "\\|") "\\|")) - "\\(?:" - (mapconcat 'identity re-anchored "\\|") - "\\)" file-name-version-regexp "?\\'")))) + (let ((re-anchored '()) + (re-free '())) + (dolist (e jka-compr-compression-info-list) + (let ((re (jka-compr-info-regexp e))) + (if (string-match "\\\\'\\'" re) + (push (substring re 0 (match-beginning 0)) re-anchored) + (push re re-free)))) + (concat + (if re-free (concat (mapconcat 'identity re-free "\\|") "\\|")) + "\\(?:" + (mapconcat 'identity re-anchored "\\|") + "\\)" file-name-version-regexp "?\\'"))) ;; Functions for accessing the return value of jka-compr-get-compression-info ;; FIXME: Use cl-defstruct! @@ -202,7 +201,6 @@ options through Custom does this automatically." ;; uncomp-message uncomp-prog uncomp-args ;; can-append strip-extension-flag file-magic-bytes ;; uncompress-function] - (mapcar 'purecopy `(["\\.Z\\'" "compressing" "compress" ("-c") ;; gzip is more common than uncompress. It can only read, not write. @@ -261,7 +259,7 @@ options through Custom does this automatically." ["\\.tzst\\'" "zstd compressing" "zstd" ("-c" "-q") "zstd uncompressing" "zstd" ("-c" "-q" "-d") - t nil "\050\265\057\375"])) + t nil "\050\265\057\375"]) "List of vectors that describe available compression techniques. Each element, which describes a compression technique, is a vector of @@ -329,10 +327,10 @@ variables. Setting this through Custom does that automatically." :group 'jka-compr) (defcustom jka-compr-mode-alist-additions - (purecopy '(("\\.tgz\\'" . tar-mode) - ("\\.tbz2?\\'" . tar-mode) - ("\\.txz\\'" . tar-mode) - ("\\.tzst\\'" . tar-mode))) + '(("\\.tgz\\'" . tar-mode) + ("\\.tbz2?\\'" . tar-mode) + ("\\.txz\\'" . tar-mode) + ("\\.tzst\\'" . tar-mode)) "List of pairs added to `auto-mode-alist' when installing jka-compr. Uninstalling jka-compr removes all pairs from `auto-mode-alist' that installing added. @@ -346,7 +344,7 @@ variables. Setting this through Custom does that automatically." :set 'jka-compr-set :group 'jka-compr) -(defcustom jka-compr-load-suffixes (purecopy '(".gz")) +(defcustom jka-compr-load-suffixes '(".gz") "List of compression related suffixes to try when loading files. Enabling Auto Compression mode appends this list to `load-file-rep-suffixes', which see. Disabling Auto Compression mode removes all suffixes diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el index 26a96c541cd..14098c7e470 100644 --- a/lisp/language/ethiopic.el +++ b/lisp/language/ethiopic.el @@ -56,7 +56,7 @@ "CCL program to encode an Ethiopic code to code point of Ethiopic font.") (setq font-ccl-encoder-alist - (cons (cons (purecopy "ethiopic") ccl-encode-ethio-font) font-ccl-encoder-alist)) + (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist)) (set-language-info-alist "Ethiopic" '((setup-function . setup-ethiopic-environment-internal) diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index b9dbfc6d9cc..fda6e8b4d79 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el @@ -29,10 +29,10 @@ ;;;###autoload (defvar default-korean-keyboard - (purecopy (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) + (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" - "")) - "The kind of Korean keyboard for Korean (Hangul) input method. + "") + "The kind of Korean keyboard for Korean (Hangul) input method. \"\" for 2, \"3\" for 3, and \"3f\" for 3f.") ;; functions useful for Korean text input diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el index 7645d77603c..76f43ade081 100644 --- a/lisp/language/tibetan.el +++ b/lisp/language/tibetan.el @@ -574,19 +574,17 @@ The result of matching is to be used for indexing alists at conversion from a roman transcription to the corresponding Tibetan character.") (defvar tibetan-precomposed-regexp - (purecopy - (eval-when-compile - (concat "^" - (regexp-opt (mapcar #'car tibetan-precomposed-transcription-alist) - t)))) + (eval-when-compile + (concat "^" + (regexp-opt (mapcar #'car tibetan-precomposed-transcription-alist) + t))) "Regexp string to match a romanized Tibetan complex consonant. The result of matching is to be used for indexing alists when the input key from an input method is converted to the corresponding precomposed glyph.") (defvar tibetan-precomposition-rule-regexp - (purecopy - (eval-when-compile - (regexp-opt (mapcar #'car tibetan-precomposition-rule-alist) t))) + (eval-when-compile + (regexp-opt (mapcar #'car tibetan-precomposition-rule-alist) t)) "Regexp string to match a sequence of Tibetan consonantic components. That is, one base consonant and one or more subjoined consonants. The result of matching is to be used for indexing alist when the component diff --git a/lisp/locate.el b/lisp/locate.el index 759551fed9b..d6d86ded1b1 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -182,7 +182,7 @@ or `locate-make-command-line', determines the database." :type '(choice (const :tag "None" nil) face)) ;;;###autoload -(defcustom locate-ls-subdir-switches (purecopy "-al") +(defcustom locate-ls-subdir-switches "-al" "`ls' switches for inserting subdirectories in `*Locate*' buffers. This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches." :type 'string diff --git a/lisp/lpr.el b/lisp/lpr.el index 2b38d6140c3..6c80fa9c20a 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -94,14 +94,13 @@ This switch is used in conjunction with `printer-name'." ;;;###autoload (defcustom lpr-command - (purecopy (cond (lpr-windows-system "") (lpr-lp-system "lp") (t - "lpr"))) + "lpr")) "Name of program for printing a file. On MS-DOS and MS-Windows systems, if the value is an empty string then diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index bf4200c459b..44b49293d08 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -152,7 +152,7 @@ its character representation and its display representation.") :group 'rmail) ;;;###autoload -(defcustom rmail-file-name (purecopy "~/RMAIL") +(defcustom rmail-file-name "~/RMAIL" "Name of user's primary mail file." :type 'string :group 'rmail @@ -160,7 +160,6 @@ its character representation and its display representation.") ;;;###autoload (defcustom rmail-spool-directory - (purecopy (cond ((file-exists-p "/var/mail") ;; SVR4 and recent BSD are said to use this. ;; Rather than trying to know precisely which systems use it, @@ -169,7 +168,7 @@ its character representation and its display representation.") ;; Many GNU/Linux systems use this name. ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v)) "/usr/mail/") - (t "/usr/spool/mail/"))) + (t "/usr/spool/mail/")) "Name of directory used by system mailer for delivering new mail. Its name should end with a slash." :initialize #'custom-initialize-delay @@ -316,7 +315,6 @@ Setting this variable has an effect only before reading a mail." ;;;###autoload (defcustom rmail-ignored-headers - (purecopy (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" @@ -336,7 +334,7 @@ Setting this variable has an effect only before reading a mail." "\\|^Received-SPF:" "\\|^Authentication-Results:" "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" - "\\|^x-.*:")) + "\\|^x-.*:") "Regexp to match header fields that Rmail should normally hide. \(See also `rmail-nonignored-headers', which overrides this regexp.) This variable is used for reformatting the message header, @@ -385,7 +383,7 @@ If nil, display all header fields except those matched by :version "29.1") ;;;###autoload -(defcustom rmail-highlighted-headers (purecopy "^From:\\|^Subject:") +(defcustom rmail-highlighted-headers "^From:\\|^Subject:" "Regexp to match Header fields that Rmail should normally highlight. A value of nil means don't highlight. Uses the face `rmail-highlight'." :type '(choice regexp (const :tag "None" nil)) @@ -436,12 +434,12 @@ the frame where you have the RMAIL buffer displayed." :group 'rmail-reply) ;;;###autoload -(defcustom rmail-secondary-file-directory (purecopy "~/") +(defcustom rmail-secondary-file-directory "~/" "Directory for additional secondary Rmail files." :type 'directory :group 'rmail-files) ;;;###autoload -(defcustom rmail-secondary-file-regexp (purecopy "\\.xmail\\'") +(defcustom rmail-secondary-file-regexp "\\.xmail\\'" "Regexp for which files are secondary Rmail files." :type 'regexp :group 'rmail-files) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index baa45465963..27d1fdb2960 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -160,7 +160,7 @@ This is used by the default mail-sending commands. See also :version "24.1") ;;;###autoload -(defcustom mail-header-separator (purecopy "--text follows this line--") +(defcustom mail-header-separator "--text follows this line--" "Line used to separate headers from text in messages being composed." :type 'string) @@ -201,7 +201,7 @@ The default file is defined in sendmail's configuration file, e.g. :type '(choice (const :tag "Sendmail default" nil) file)) ;;;###autoload -(defcustom mail-personal-alias-file (purecopy "~/.mailrc") +(defcustom mail-personal-alias-file "~/.mailrc" "If non-nil, the name of the user's personal mail alias file. This file typically should be in same format as the `.mailrc' file used by the `Mail' or `mailx' program. @@ -258,9 +258,7 @@ regardless of what part of it (if any) is included in the cited text.") ;;;###autoload (defcustom mail-citation-prefix-regexp - ;; Use [[:word:]] rather than \w so we don't get tripped up if one - ;; of those chars has a weird `syntax-table' text property. - (purecopy "\\([ \t]*\\([[:word:]]\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+") + "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+" "Regular expression to match a citation prefix plus whitespace. It should match whatever sort of citation prefixes you want to handle, with whitespace before and after; it should also match just whitespace. @@ -379,12 +377,12 @@ and should insert whatever you want to insert." :risky t) ;;;###autoload -(defcustom mail-signature-file (purecopy "~/.signature") +(defcustom mail-signature-file "~/.signature" "File containing the text inserted at end of mail buffer." :type 'file) ;;;###autoload -(defcustom mail-default-directory (purecopy "~/") +(defcustom mail-default-directory "~/" "Value of `default-directory' for Mail mode buffers. This directory is used for auto-save files of Mail mode buffers. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index fe165f8af09..b12be3b2dda 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -488,7 +488,7 @@ in the tool bar will close the current window where possible." (or (not (boundp 'xref-backend-functions)) (eq (car xref-backend-functions) 'etags--xref-backend))) -(defvar yank-menu (cons (purecopy "Select Yank") nil)) +(defvar yank-menu '("Select Yank" nil)) (fset 'yank-menu (cons 'keymap yank-menu)) (defvar menu-bar-edit-menu @@ -2180,7 +2180,7 @@ key, a click, or a menu-item")) (define-key global-map [menu-bar file] (cons "File" menu-bar-file-menu)) (define-key global-map [menu-bar help-menu] - (cons (purecopy "Help") menu-bar-help-menu)) + (cons "Help" menu-bar-help-menu)) (define-key global-map [menu-bar mouse-1] 'menu-bar-open-mouse) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 29cc62cbcd6..1852bd137da 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1319,25 +1319,25 @@ This does nothing except loading eudc by autoload side-effect." (defvar eudc-tools-menu (let ((map (make-sparse-keymap "Directory Servers"))) (define-key map [phone] - `(menu-item ,(purecopy "Get Phone") eudc-get-phone - :help ,(purecopy "Get the phone field of name from the directory server"))) + '(menu-item "Get Phone" eudc-get-phone + :help "Get the phone field of name from the directory server")) (define-key map [email] - `(menu-item ,(purecopy "Get Email") eudc-get-email - :help ,(purecopy "Get the email field of NAME from the directory server"))) + '(menu-item "Get Email" eudc-get-email + :help "Get the email field of NAME from the directory server")) (define-key map [separator-eudc-email] menu-bar-separator) (define-key map [expand-inline] - `(menu-item ,(purecopy "Expand Inline Query") eudc-expand-inline - :help ,(purecopy "Query the directory server, and expand the query string before point"))) + '(menu-item "Expand Inline Query" eudc-expand-inline + :help "Query the directory server, and expand the query string before point")) (define-key map [query] - `(menu-item ,(purecopy "Query with Form") eudc-query-form - :help ,(purecopy "Display a form to query the directory server"))) + '(menu-item "Query with Form" eudc-query-form + :help "Display a form to query the directory server")) (define-key map [separator-eudc-query] menu-bar-separator) (define-key map [new] - `(menu-item ,(purecopy "New Server") eudc-set-server - :help ,(purecopy "Set the directory server to SERVER using PROTOCOL"))) + '(menu-item "New Server" eudc-set-server + :help "Set the directory server to SERVER using PROTOCOL")) (define-key map [load] - `(menu-item ,(purecopy "Load Hotlist of Servers") eudc-load-eudc - :help ,(purecopy "Load the Emacs Unified Directory Client"))) + '(menu-item "Load Hotlist of Servers" eudc-load-eudc + :help "Load the Emacs Unified Directory Client")) map)) (fset 'eudc-tools-menu (symbol-value 'eudc-tools-menu))) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index c4d46000f15..10cf51cdd6c 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -136,7 +136,7 @@ by the close of the first pair.") (put 'comment-end-skip 'safe-local-variable 'stringp) ;;;###autoload -(defvar comment-end (purecopy "") +(defvar comment-end "" "String to insert to end a new comment. Should be an empty string if comments are terminated by end-of-line.") ;;;###autoload @@ -288,7 +288,7 @@ See `comment-styles' for a list of available styles." :group 'comment) ;;;###autoload -(defcustom comment-padding (purecopy " ") +(defcustom comment-padding " " "Padding string that `comment-region' puts between comment chars and text. Can also be an integer which will be automatically turned into a string of the corresponding number of spaces. diff --git a/lisp/obsolete/autoload.el b/lisp/obsolete/autoload.el index 51a4d91a7f3..e4ebbcb01a7 100644 --- a/lisp/obsolete/autoload.el +++ b/lisp/obsolete/autoload.el @@ -415,8 +415,7 @@ FILE's modification time." load-name outfile)) (let ((standard-output (marker-buffer output-start)) (print-quoted t)) - (princ `(push (purecopy - ',(cons (intern package) version)) + (princ `(push ',(cons (intern package) version) package--builtin-versions)) (princ "\n"))))) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 157a8473631..c9b43fe8e16 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -257,7 +257,6 @@ This has effect only if `search-invisible' is set to `open'." ;; FIXME: Currently the check is made via ;; (assoc major-mode hs-special-modes-alist) so it doesn't pay attention ;; to the mode hierarchy. - (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) @@ -270,7 +269,7 @@ This has effect only if `search-invisible' is set to `open'." (lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "