From 8efc49097fc8cf126554ede9baff397c87838881 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 9 Dec 2024 03:39:56 +0100 Subject: [PATCH] Don't call purecopy in progmodes/*.el * lisp/progmodes/compile.el (compile-command): * lisp/progmodes/etags.el (tags-compression-info-list): * lisp/progmodes/grep.el (grep-program, find-program, xargs-program): * lisp/progmodes/js.el (interpreter-mode-alist): * lisp/progmodes/python.el (interpreter-mode-alist): * lisp/progmodes/ruby-mode.el (auto-mode-alist, interpreter-mode-alist): * lisp/progmodes/vera-mode.el: Remove calls to purecopy. (cherry picked from commit 04408e198f1acc2eeae2ca299de994ba38116d1a) --- lisp/progmodes/compile.el | 2 +- lisp/progmodes/etags.el | 4 ++-- lisp/progmodes/grep.el | 6 +++--- lisp/progmodes/js.el | 2 +- lisp/progmodes/python.el | 2 +- lisp/progmodes/ruby-mode.el | 20 ++++++++++---------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 4111ae92088..ec66ef5c41e 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -960,7 +960,7 @@ The value nil as an element means to try the default directory." (string :tag "Directory")))) ;;;###autoload -(defcustom compile-command (purecopy "make -k ") +(defcustom compile-command "make -k " "Last shell command used to do a compilation; default for next compilation. Sometimes it is useful for files to supply local values for this variable. diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index bef2cfce95e..950afeb080e 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -44,7 +44,7 @@ invoke `visit-tags-table', which is the only reliable way of setting the value of this variable, whether buffer-local or global. Use the `etags' program to make a tags table file.") ;; Make M-x set-variable tags-file-name like M-x visit-tags-table. -;;;###autoload (put 'tags-file-name 'variable-interactive (purecopy "fVisit tags table: ")) +;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ") ;;;###autoload (put 'tags-file-name 'safe-local-variable 'stringp) (defgroup etags nil "Tags tables." @@ -73,7 +73,7 @@ Use the `etags' program to make a tags table file." ;;;###autoload (defcustom tags-compression-info-list - (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) + '("" ".Z" ".bz2" ".gz" ".xz" ".tgz") "List of extensions tried by etags when `auto-compression-mode' is on. An empty string means search the non-compressed file." :version "24.1" ; added xz diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 90b8ad0a6c0..68b90822f8d 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -543,18 +543,18 @@ redundant).") This gets tacked on the end of the generated expressions.") ;;;###autoload -(defvar grep-program (purecopy "grep") +(defvar grep-program "grep" "The default grep program for `grep-command' and `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called.") ;;;###autoload -(defvar find-program (purecopy "find") +(defvar find-program "find" "The default find program. This is used by commands like `grep-find-command', `find-dired' and others.") ;;;###autoload -(defvar xargs-program (purecopy "xargs") +(defvar xargs-program "xargs" "The default xargs program for `grep-find-command'. See `grep-find-use-xargs'. This variable's value takes effect when `grep-compute-defaults' is called.") diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 635f6d8200e..4e2e32132ef 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4057,7 +4057,7 @@ one of the aforementioned options instead of using this mode." ;;;###autoload (dolist (name (list "node" "nodejs" "gjs" "rhino")) - (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'js-mode))) + (add-to-list 'interpreter-mode-alist (cons name 'js-mode))) (provide 'js) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 578819b81e7..2c71fabd4fa 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -287,7 +287,7 @@ ;;;###autoload (add-to-list 'auto-mode-alist (cons python--auto-mode-alist-regexp 'python-mode)) ;;;###autoload -(add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 'python-mode)) +(add-to-list 'interpreter-mode-alist '("python[0-9.]*" python-mode)) (defgroup python nil "Python Language's flying circus support for Emacs." diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5f30ab671d9..77a3eb8b325 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2734,20 +2734,20 @@ Currently there are `ruby-mode' and `ruby-ts-mode'." ;;;###autoload (add-to-list 'auto-mode-alist - (cons (purecopy (concat "\\(?:\\.\\(?:" - "rbw?\\|ru\\|rake\\|thor\\|axlsx" - "\\|jbuilder\\|rabl\\|gemspec\\|podspec" - "\\)" - "\\|/" - "\\(?:Gem\\|Rake\\|Cap\\|Thor" - "\\|Puppet\\|Berks\\|Brew\\|Fast" - "\\|Vagrant\\|Guard\\|Pod\\)file" - "\\)\\'")) + (cons (concat "\\(?:\\.\\(?:" + "rbw?\\|ru\\|rake\\|thor\\|axlsx" + "\\|jbuilder\\|rabl\\|gemspec\\|podspec" + "\\)" + "\\|/" + "\\(?:Gem\\|Rake\\|Cap\\|Thor" + "\\|Puppet\\|Berks\\|Brew\\|Fast" + "\\|Vagrant\\|Guard\\|Pod\\)file" + "\\)\\'") 'ruby-mode)) ;;;###autoload (dolist (name (list "ruby" "rbx" "jruby" "j?ruby\\(?:[0-9.]+\\)")) - (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode))) + (add-to-list 'interpreter-mode-alist (cons name 'ruby-mode))) ;; See ruby-ts-mode.el for why we do this. (setq major-mode-remap-defaults -- 2.39.5