Don't call purecopy in textmodes/*.el

* lisp/textmodes/bibtex.el (bibtex-url, bibtex-search-crossref):
* lisp/textmodes/fill.el (adaptive-fill-regexp)
(adaptive-fill-first-line-regexp):
* lisp/textmodes/ispell.el (ispell-menu-map)
(ispell-skip-region-alist, ispell-tex-skip-alists):
* lisp/textmodes/rst.el (auto-mode-alist):
* lisp/textmodes/texinfo.el (texinfo-open-quote):
* lisp/textmodes/tex-mode.el (tex-directory, tex-run-command)
(latex-run-command, slitex-run-command, tex-start-options)
(tex-start-commands, tex-bibtex-command, tex-dvi-print-command)
(tex-alt-dvi-print-command, tex-dvi-view-command)
(tex-show-queue-command, tex-open-quote, tex-close-quote):
* lisp/textmodes/texinfo.el (texinfo-open-quote)
(texinfo-close-quote): Remove calls to purecopy.
This commit is contained in:
Stefan Kangas 2024-12-09 03:47:37 +01:00
parent 04408e198f
commit e44b1bf5cc
6 changed files with 63 additions and 64 deletions

View file

@ -3556,12 +3556,12 @@ BOUND limits the search."
(define-button-type 'bibtex-url
'action 'bibtex-button-action
'bibtex-function #'bibtex-url
'help-echo (purecopy "mouse-2, RET: follow URL"))
'help-echo "mouse-2, RET: follow URL")
(define-button-type 'bibtex-search-crossref
'action 'bibtex-button-action
'bibtex-function #'bibtex-search-crossref
'help-echo (purecopy "mouse-2, RET: follow crossref"))
'help-echo "mouse-2, RET: follow crossref")
(defun bibtex-button (beg end type &rest args)
"Make a BibTeX button from BEG to END of type TYPE in the current buffer."

View file

@ -103,7 +103,7 @@ reinserts the fill prefix in each resulting line."
;; Added `%' for TeX comments.
;; RMS: deleted the code to match `1.' and `(1)'.
;; Update mail-mode's paragraph-separate if you change this.
(purecopy "[-!|#%;>*·•‣⁃◦ \t]*")
"[-!|#%;>*·•‣⁃◦ \t]*"
"Regexp to match text at start of line that constitutes indentation.
If Adaptive Fill mode is enabled, a prefix matching this pattern
on the first and second lines of a paragraph is used as the
@ -114,7 +114,7 @@ line, but in that case `adaptive-fill-first-line-regexp' also plays
a role."
:type 'regexp)
(defcustom adaptive-fill-first-line-regexp (purecopy "\\`[ \t]*\\'")
(defcustom adaptive-fill-first-line-regexp "\\`[ \t]*\\'"
"Regexp specifying whether to set fill prefix from a one-line paragraph.
When a paragraph has just one line, then after `adaptive-fill-regexp'
finds the prefix at the beginning of the line, if it doesn't

View file

@ -1427,66 +1427,66 @@ The variable `ispell-library-directory' defines their location."
;; Define commands in menu in opposite order you want them to appear.
(let ((map (make-sparse-keymap "Spell")))
(define-key map [ispell-change-dictionary]
`(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary
:help ,(purecopy "Supply explicit dictionary file name")))
'(menu-item "Change Dictionary..." ispell-change-dictionary
:help "Supply explicit dictionary file name"))
(define-key map [ispell-kill-ispell]
`(menu-item ,(purecopy "Kill Process")
(lambda () (interactive) (ispell-kill-ispell nil 'clear))
`(menu-item "Kill Process"
,(lambda () (interactive) (ispell-kill-ispell nil 'clear))
:enable (and (boundp 'ispell-process) ispell-process
(eq (ispell-process-status) 'run))
:help ,(purecopy "Terminate Ispell subprocess")))
:help "Terminate Ispell subprocess"))
(define-key map [ispell-pdict-save]
`(menu-item ,(purecopy "Save Dictionary")
(lambda () (interactive) (ispell-pdict-save t t))
:help ,(purecopy "Save personal dictionary")))
`(menu-item "Save Dictionary"
,(lambda () (interactive) (ispell-pdict-save t t))
:help "Save personal dictionary"))
(define-key map [ispell-customize]
`(menu-item ,(purecopy "Customize...")
(lambda () (interactive) (customize-group 'ispell))
:help ,(purecopy "Customize spell checking options")))
`(menu-item "Customize..."
,(lambda () (interactive) (customize-group 'ispell))
:help "Customize spell checking options"))
(define-key map [ispell-help]
;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ?
`(menu-item ,(purecopy "Help")
(lambda () (interactive) (describe-function 'ispell-help))
:help ,(purecopy "Show standard Ispell keybindings and commands")))
`(menu-item "Help"
,(lambda () (interactive) (describe-function 'ispell-help))
:help "Show standard Ispell keybindings and commands"))
(define-key map [flyspell-mode]
`(menu-item ,(purecopy "Automatic spell checking (Flyspell)")
'(menu-item "Automatic spell checking (Flyspell)"
flyspell-mode
:help ,(purecopy "Check spelling while you edit the text")
:help "Check spelling while you edit the text"
:button (:toggle . (bound-and-true-p flyspell-mode))))
(define-key map [ispell-complete-word]
`(menu-item ,(purecopy "Complete Word") ispell-complete-word
:help ,(purecopy "Complete word at cursor using dictionary")))
'(menu-item "Complete Word" ispell-complete-word
:help "Complete word at cursor using dictionary"))
(define-key map [ispell-complete-word-interior-frag]
`(menu-item ,(purecopy "Complete Word Fragment")
'(menu-item "Complete Word Fragment"
ispell-complete-word-interior-frag
:help ,(purecopy "Complete word fragment at cursor")))
:help "Complete word fragment at cursor"))
(define-key map [ispell-continue]
`(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue
'(menu-item "Continue Spell-Checking" ispell-continue
:enable (and (boundp 'ispell-region-end)
(marker-position ispell-region-end)
(equal (marker-buffer ispell-region-end)
(current-buffer)))
:help ,(purecopy "Continue spell checking last region")))
:help "Continue spell checking last region"))
(define-key map [ispell-word]
`(menu-item ,(purecopy "Spell-Check Word") ispell-word
:help ,(purecopy "Spell-check word at cursor")))
'(menu-item "Spell-Check Word" ispell-word
:help "Spell-check word at cursor"))
(define-key map [ispell-comments-and-strings]
`(menu-item ,(purecopy "Spell-Check Comments")
'(menu-item "Spell-Check Comments"
ispell-comments-and-strings
:help ,(purecopy "Spell-check only comments and strings")))
:help "Spell-check only comments and strings"))
(define-key map [ispell-region]
`(menu-item ,(purecopy "Spell-Check Region") ispell-region
'(menu-item "Spell-Check Region" ispell-region
:enable mark-active
:help ,(purecopy "Spell-check text in marked region")))
:help "Spell-check text in marked region"))
(define-key map [ispell-message]
`(menu-item ,(purecopy "Spell-Check Message") ispell-message
'(menu-item "Spell-Check Message" ispell-message
:visible (eq major-mode 'mail-mode)
:help ,(purecopy "Skip headers and included message text")))
:help "Skip headers and included message text"))
(define-key map [ispell-buffer]
`(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer
:help ,(purecopy "Check spelling of selected buffer")))
'(menu-item "Spell-Check Buffer" ispell-buffer
:help "Check spelling of selected buffer"))
map)
"Key map for ispell menu.")
;;;###autoload
@ -1659,21 +1659,21 @@ objects as practicable, without too many false matches happening."
;;;###autoload
(defvar ispell-skip-region-alist
`((ispell-words-keyword forward-line)
'((ispell-words-keyword forward-line)
(ispell-dictionary-keyword forward-line)
(ispell-pdict-keyword forward-line)
(ispell-parsing-keyword forward-line)
(,(purecopy "^---*BEGIN PGP [A-Z ]*--*")
. ,(purecopy "^---*END PGP [A-Z ]*--*"))
("^---*BEGIN PGP [A-Z ]*--*"
. "^---*END PGP [A-Z ]*--*")
;; assume multiline uuencoded file? "\nM.*$"?
(,(purecopy "^begin [0-9][0-9][0-9] [^ \t]+$") . ,(purecopy "\nend\n"))
(,(purecopy "^%!PS-Adobe-[123].0") . ,(purecopy "\n%%EOF\n"))
(,(purecopy "^---* \\(Start of \\)?[Ff]orwarded [Mm]essage")
. ,(purecopy "^---* End of [Ff]orwarded [Mm]essage"))
("^begin [0-9][0-9][0-9] [^ \t]+$" . "\nend\n")
("^%!PS-Adobe-[123].0" . "\n%%EOF\n")
("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage"
. "^---* End of [Ff]orwarded [Mm]essage")
;; Matches e-mail addresses, file names, http addresses, etc. The
;; `-+' `_+' patterns are necessary for performance reasons when
;; `-' or `_' part of word syntax.
; (,(purecopy "\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)"))
; ("\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
;; above checks /.\w sequences
;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
;; This is a pretty complex regexp. It can be simplified to the following:
@ -1696,7 +1696,6 @@ Valid forms include:
;;;###autoload
(defvar ispell-tex-skip-alists
(purecopy
'((;;("%\\[" . "%\\]") ; AMStex block comment...
;; All the standard LaTeX keywords from L. Lamport's guide:
;; \cite, \hspace, \hspace*, \hyphenation, \include, \includeonly, \input,
@ -1715,7 +1714,7 @@ Valid forms include:
("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0)
("list" ispell-tex-arg-end 2)
("program" . "\\\\end[ \t]*{program}")
("verbatim\\*?" . "\\\\end[ \t]*{verbatim\\*?}"))))
("verbatim\\*?" . "\\\\end[ \t]*{verbatim\\*?}")))
"Lists of regions to be skipped in TeX mode.
First list is used raw.
Second list has key placed inside \\begin{}.

View file

@ -1325,7 +1325,7 @@ The hook for `text-mode' is run before this one."
;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files
;; use *.txt, but this is too generic to be set as a default.
;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.re?st\\'" . rst-mode))
;;;###autoload
(define-derived-mode rst-mode text-mode "ReST"
"Major mode for editing reStructuredText documents.

View file

@ -64,7 +64,7 @@
:group 'tex-run)
;;;###autoload
(defcustom tex-directory (purecopy ".")
(defcustom tex-directory "."
"Directory in which temporary files are written.
You can make this `/tmp' if your TEXINPUTS has no relative directories in it
and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are
@ -98,7 +98,7 @@ if the variable is non-nil."
:group 'tex-file)
;;;###autoload
(defcustom tex-run-command (purecopy "tex")
(defcustom tex-run-command "tex"
"Command used to run TeX subjob.
TeX Mode sets `tex-command' to this string.
See the documentation of that variable."
@ -106,7 +106,7 @@ See the documentation of that variable."
:group 'tex-run)
;;;###autoload
(defcustom latex-run-command (purecopy "latex")
(defcustom latex-run-command "latex"
"Command used to run LaTeX subjob.
LaTeX Mode sets `tex-command' to this string.
See the documentation of that variable."
@ -114,7 +114,7 @@ See the documentation of that variable."
:group 'tex-run)
;;;###autoload
(defcustom slitex-run-command (purecopy "slitex")
(defcustom slitex-run-command "slitex"
"Command used to run SliTeX subjob.
SliTeX Mode sets `tex-command' to this string.
See the documentation of that variable."
@ -122,7 +122,7 @@ See the documentation of that variable."
:group 'tex-run)
;;;###autoload
(defcustom tex-start-options (purecopy "")
(defcustom tex-start-options ""
"TeX options to use when starting TeX.
These immediately precede the commands in `tex-start-commands'
and the input file name, with no separating space and are not shell-quoted.
@ -132,7 +132,7 @@ If nil, TeX runs with no options. See the documentation of `tex-command'."
:version "22.1")
;;;###autoload
(defcustom tex-start-commands (purecopy "\\nonstopmode\\input")
(defcustom tex-start-commands "\\nonstopmode\\input"
"TeX commands to use when starting TeX.
They are shell-quoted and precede the input file name, with a separating space.
If nil, no commands are used. See the documentation of `tex-command'."
@ -163,7 +163,7 @@ Combined with `latex-standard-block-names' for minibuffer completion."
:group 'tex-run)
;;;###autoload
(defcustom tex-bibtex-command (purecopy "bibtex")
(defcustom tex-bibtex-command "bibtex"
"Command used by `tex-bibtex-file' to gather bibliographic data.
If this string contains an asterisk (`*'), that is replaced by the file name;
otherwise, the file name, preceded by blank, is added at the end."
@ -171,7 +171,7 @@ otherwise, the file name, preceded by blank, is added at the end."
:group 'tex-run)
;;;###autoload
(defcustom tex-dvi-print-command (purecopy "lpr -d")
(defcustom tex-dvi-print-command "lpr -d"
"Command used by \\[tex-print] to print a .dvi file.
If this string contains an asterisk (`*'), that is replaced by the file name;
otherwise, the file name, preceded by blank, is added at the end."
@ -179,7 +179,7 @@ otherwise, the file name, preceded by blank, is added at the end."
:group 'tex-view)
;;;###autoload
(defcustom tex-alt-dvi-print-command (purecopy "lpr -d")
(defcustom tex-alt-dvi-print-command "lpr -d"
"Command used by \\[tex-print] with a prefix arg to print a .dvi file.
If this string contains an asterisk (`*'), that is replaced by the file name;
otherwise, the file name, preceded by blank, is added at the end.
@ -199,9 +199,9 @@ use."
;;;###autoload
(defcustom tex-dvi-view-command
(cond ((eq window-system 'x) (purecopy "xdvi"))
((eq window-system 'w32) (purecopy "yap"))
(t (purecopy "dvi2tty * | cat -s")))
(cond ((eq window-system 'x) "xdvi")
((eq window-system 'w32) "yap")
(t "dvi2tty * | cat -s"))
"Command used by \\[tex-view] to display a `.dvi' file.
If this string contains an asterisk (`*'), that is replaced by the file name;
otherwise, the file name, preceded by a space, is added at the end.
@ -214,7 +214,7 @@ will lead to a warning. Set it to a string instead."
:group 'tex-view)
;;;###autoload
(defcustom tex-show-queue-command (purecopy "lpq")
(defcustom tex-show-queue-command "lpq"
"Command used by \\[tex-show-print-queue] to show the print queue.
Should show the queue(s) that \\[tex-print] puts jobs on."
:type 'string
@ -230,14 +230,14 @@ Normally set to either `plain-tex-mode' or `latex-mode'."
:group 'tex)
;;;###autoload
(defcustom tex-open-quote (purecopy "``")
(defcustom tex-open-quote "``"
"String inserted by typing \\[tex-insert-quote] to open a quotation."
:type 'string
:options '("``" "\"<" "\"`" "<<" "«")
:group 'tex)
;;;###autoload
(defcustom tex-close-quote (purecopy "''")
(defcustom tex-close-quote "''"
"String inserted by typing \\[tex-insert-quote] to close a quotation."
:type 'string
:options '("''" "\">" "\"'" ">>" "»")

View file

@ -61,12 +61,12 @@
:group 'docs)
;;;###autoload
(defcustom texinfo-open-quote (purecopy "``")
(defcustom texinfo-open-quote "``"
"String inserted by typing \\[texinfo-insert-quote] to open a quotation."
:type 'string)
;;;###autoload
(defcustom texinfo-close-quote (purecopy "''")
(defcustom texinfo-close-quote "''"
"String inserted by typing \\[texinfo-insert-quote] to close a quotation."
:type 'string)