]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't call purecopy in help-mode.el
authorStefan Kangas <stefankangas@gmail.com>
Mon, 9 Dec 2024 19:40:56 +0000 (20:40 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 3 Feb 2025 11:03:12 +0000 (12:03 +0100)
* lisp/help-mode.el (help-function, help-variable, help-type)
(help-face, help-coding-system, help-input-method)
(help-character-set, help-symbol, help-back, help-forward)
(help-info-variable, help-info, help-man)
(help-customization-group, help-url, help-customize-variable)
(help-customize-face, help-function-def, help-function-cmacro)
(help-variable-def, help-face-def, help-package)
(help-package-def, help-theme-def, help-theme-edit)
(help-dir-local-var-def, help-news, help-back-label)
(help-forward-label, help-xref-symbol-regexp)
(help-xref-info-regexp, help-xref-man-regexp)
(help-xref-customization-group-regexp, help-xref-url-regexp):
Remove calls to purecopy.

(cherry picked from commit 065b6f2fa7a75fda446dc755edfee555b6e6d704)

lisp/help-mode.el

index b39fd606e27f1928459ff94b46c5e6f4d16c9b9a..7350ac503cdeef6c55f51eaee9e249bd03ff7741 100644 (file)
@@ -172,92 +172,92 @@ The format is (FUNCTION ARGS...).")
 (define-button-type 'help-function
   :supertype 'help-xref
   'help-function 'describe-function
-  'help-echo (purecopy "mouse-2, RET: describe this function"))
+  'help-echo "mouse-2, RET: describe this function")
 
 (define-button-type 'help-variable
   :supertype 'help-xref
   'help-function 'describe-variable
-  'help-echo (purecopy "mouse-2, RET: describe this variable"))
+  'help-echo "mouse-2, RET: describe this variable")
 
 (define-button-type 'help-type
   :supertype 'help-xref
   'help-function #'cl-describe-type
-  'help-echo (purecopy "mouse-2, RET: describe this type"))
+  'help-echo "mouse-2, RET: describe this type")
 
 (define-button-type 'help-face
   :supertype 'help-xref
   'help-function 'describe-face
-  'help-echo (purecopy "mouse-2, RET: describe this face"))
+  'help-echo "mouse-2, RET: describe this face")
 
 (define-button-type 'help-coding-system
   :supertype 'help-xref
   'help-function 'describe-coding-system
-  'help-echo (purecopy "mouse-2, RET: describe this coding system"))
+  'help-echo "mouse-2, RET: describe this coding system")
 
 (define-button-type 'help-input-method
   :supertype 'help-xref
   'help-function 'describe-input-method
-  'help-echo (purecopy "mouse-2, RET: describe this input method"))
+  'help-echo "mouse-2, RET: describe this input method")
 
 (define-button-type 'help-character-set
   :supertype 'help-xref
   'help-function 'describe-character-set
-  'help-echo (purecopy "mouse-2, RET: describe this character set"))
+  'help-echo "mouse-2, RET: describe this character set")
 
 ;; Make some more idiosyncratic button types.
 
 (define-button-type 'help-symbol
   :supertype 'help-xref
   'help-function #'describe-symbol
-  'help-echo (purecopy "mouse-2, RET: describe this symbol"))
+  'help-echo "mouse-2, RET: describe this symbol")
 
 (define-button-type 'help-back
   :supertype 'help-xref
   'help-function #'help-xref-go-back
-  'help-echo (purecopy "mouse-2, RET: go back to previous help buffer"))
+  'help-echo "mouse-2, RET: go back to previous help buffer")
 
 (define-button-type 'help-forward
   :supertype 'help-xref
   'help-function #'help-xref-go-forward
-  'help-echo (purecopy "mouse-2, RET: move forward to next help buffer"))
+  'help-echo "mouse-2, RET: move forward to next help buffer")
 
 (define-button-type 'help-info-variable
   :supertype 'help-xref
   ;; the name of the variable is put before the argument to Info
   'help-function (lambda (_a v) (info v))
-  'help-echo (purecopy "mouse-2, RET: read this Info node"))
+  'help-echo "mouse-2, RET: read this Info node")
 
 (define-button-type 'help-info
   :supertype 'help-xref
   'help-function #'info
-  'help-echo (purecopy "mouse-2, RET: read this Info node"))
+  'help-echo "mouse-2, RET: read this Info node")
 
 (define-button-type 'help-man
   :supertype 'help-xref
   'help-function #'man
-  'help-echo (purecopy "mouse-2, RET: read this man page"))
+  'help-echo "mouse-2, RET: read this man page")
 
 (define-button-type 'help-customization-group
   :supertype 'help-xref
   'help-function #'customize-group
-  'help-echo (purecopy "mouse-2, RET: display this customization group"))
+  'help-echo "mouse-2, RET: display this customization group")
 
 (define-button-type 'help-url
   :supertype 'help-xref
   'help-function #'browse-url
-  'help-echo (purecopy "mouse-2, RET: view this URL in a browser"))
+  'help-echo "mouse-2, RET: view this URL in a browser")
 
 (define-button-type 'help-customize-variable
   :supertype 'help-xref
   'help-function (lambda (v)
-                  (customize-variable v))
-  'help-echo (purecopy "mouse-2, RET: customize variable"))
+               (customize-variable v))
+  'help-echo "mouse-2, RET: customize variable")
 
 (define-button-type 'help-customize-face
   :supertype 'help-xref
   'help-function (lambda (v)
-                  (customize-face v))
-  'help-echo (purecopy "mouse-2, RET: customize face"))
+               (customize-face v))
+  'help-echo "mouse-2, RET: customize face")
 
 (defun help-function-def--button-function (fun &optional file type)
   (or file
@@ -295,7 +295,7 @@ The format is (FUNCTION ARGS...).")
 (define-button-type 'help-function-def
   :supertype 'help-xref
   'help-function #'help-function-def--button-function
-  'help-echo (purecopy "mouse-2, RET: find function's definition"))
+  'help-echo "mouse-2, RET: find function's definition")
 
 (define-button-type 'help-function-cmacro ; FIXME: Obsolete since 24.4.
   :supertype 'help-xref
@@ -316,7 +316,7 @@ The format is (FUNCTION ARGS...).")
                             (forward-line 0)
                           (message "Unable to find location in file")))
                     (message "Unable to find file")))
-  'help-echo (purecopy "mouse-2, RET: find function's compiler macro"))
+  'help-echo "mouse-2, RET: find function's compiler macro")
 
 (define-button-type 'help-variable-def
   :supertype 'help-xref
@@ -337,7 +337,7 @@ The format is (FUNCTION ARGS...).")
                                (widen))
                              (goto-char position))
                        (message "Unable to find location in file"))))
-  'help-echo (purecopy "mouse-2, RET: find variable's definition"))
+  'help-echo "mouse-2, RET: find variable's definition")
 
 (define-button-type 'help-face-def
   :supertype 'help-xref
@@ -359,27 +359,27 @@ The format is (FUNCTION ARGS...).")
                                (widen))
                              (goto-char position))
                        (message "Unable to find location in file"))))
-  'help-echo (purecopy "mouse-2, RET: find face's definition"))
+  'help-echo "mouse-2, RET: find face's definition")
 
 (define-button-type 'help-package
   :supertype 'help-xref
   'help-function 'describe-package
-  'help-echo (purecopy "mouse-2, RET: Describe package"))
+  'help-echo "mouse-2, RET: Describe package")
 
 (define-button-type 'help-package-def
   :supertype 'help-xref
   'help-function (lambda (file) (dired file))
-  'help-echo (purecopy "mouse-2, RET: visit package directory"))
+  'help-echo "mouse-2, RET: visit package directory")
 
 (define-button-type 'help-theme-def
   :supertype 'help-xref
   'help-function #'find-file
-  'help-echo (purecopy "mouse-2, RET: visit theme file"))
+  'help-echo "mouse-2, RET: visit theme file")
 
 (define-button-type 'help-theme-edit
   :supertype 'help-xref
   'help-function #'customize-create-theme
-  'help-echo (purecopy "mouse-2, RET: edit this theme file"))
+  'help-echo "mouse-2, RET: edit this theme file")
 
 (define-button-type 'help-dir-local-var-def
   :supertype 'help-xref
@@ -387,7 +387,7 @@ The format is (FUNCTION ARGS...).")
                   ;; FIXME: this should go to the point where the
                   ;; local variable was defined.
                   (find-file file))
-  'help-echo (purecopy "mouse-2, RET: open directory-local variables file"))
+  'help-echo "mouse-2, RET: open directory-local variables file")
 (define-button-type 'help-news
   :supertype 'help-xref
   'help-function
@@ -396,7 +396,7 @@ The format is (FUNCTION ARGS...).")
         (view-file file)
       (view-file-other-window file))
     (goto-char pos))
-  'help-echo (purecopy "mouse-2, RET: show corresponding NEWS announcement"))
+  'help-echo "mouse-2, RET: show corresponding NEWS announcement")
 
 (define-button-type 'help-library-def
   :supertype 'help-xref
@@ -453,21 +453,21 @@ Commands:
 ;; similar should be done for widget doc strings, which currently use
 ;; another mechanism.
 
-(defvar help-back-label (purecopy "[back]")
+(defvar help-back-label "[back]"
   "Label to use by `help-make-xrefs' for the go-back reference.")
 
-(defvar help-forward-label (purecopy "[forward]")
+(defvar help-forward-label "[forward]"
   "Label to use by `help-make-xrefs' for the go-forward reference.")
 
 (defconst help-xref-symbol-regexp
-  (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|"  ; Link to var
-                   "\\(function\\|command\\|call\\)\\|"   ; Link to function
-                   "\\(face\\)\\|"                        ; Link to face
-                   "\\(symbol\\|program\\|property\\)\\|" ; Don't link
-                   "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"
-                   "[ \t\n]+\\)?"
-                    "\\(\\\\\\+\\)?"
-                    "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]"))
+  (concat "\\(\\<\\(\\(variable\\|option\\)\\|"  ; Link to var
+          "\\(function\\|command\\|call\\)\\|"   ; Link to function
+          "\\(face\\)\\|"                        ; Link to face
+          "\\(symbol\\|program\\|property\\)\\|" ; Don't link
+          "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"
+          "[ \t\n]+\\)?"
+          "\\(\\\\\\+\\)?"
+          "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]")
   "Regexp matching doc string references to symbols.
 
 The words preceding the quoted symbol can be used in doc strings to
@@ -482,21 +482,19 @@ when help commands related to multilingual environment (e.g.,
 
 
 (defconst help-xref-info-regexp
-  (purecopy
-   "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]")
+  "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]"
   "Regexp matching doc string references to an Info node.")
 
 (defconst help-xref-man-regexp
-  (purecopy
-   "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]")
+  "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]"
   "Regexp matching doc string references to a man page.")
 
 (defconst help-xref-customization-group-regexp
-  (purecopy "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]")
+  "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]"
   "Regexp matching doc string references to a customization group.")
 
 (defconst help-xref-url-regexp
-  (purecopy "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]")
+  "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]"
   "Regexp matching doc string references to a URL.")
 
 ;;;###autoload