diff options
| author | Stefan Kangas | 2024-12-09 20:40:56 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-12 22:48:18 +0100 |
| commit | 065b6f2fa7a75fda446dc755edfee555b6e6d704 (patch) | |
| tree | 76f8f945217cb7b08cf5dff6416a5e86d800f343 /lisp | |
| parent | e44b1bf5cca00edb87452f864e9c450116d8f830 (diff) | |
| download | emacs-065b6f2fa7a75fda446dc755edfee555b6e6d704.tar.gz emacs-065b6f2fa7a75fda446dc755edfee555b6e6d704.zip | |
Don't call purecopy in help-mode.el
* 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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/help-mode.el | 88 |
1 files changed, 43 insertions, 45 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 33b8eccab2c..f7c6278d052 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -170,92 +170,92 @@ The format is (FUNCTION ARGS...).") | |||
| 170 | (define-button-type 'help-function | 170 | (define-button-type 'help-function |
| 171 | :supertype 'help-xref | 171 | :supertype 'help-xref |
| 172 | 'help-function 'describe-function | 172 | 'help-function 'describe-function |
| 173 | 'help-echo (purecopy "mouse-2, RET: describe this function")) | 173 | 'help-echo "mouse-2, RET: describe this function") |
| 174 | 174 | ||
| 175 | (define-button-type 'help-variable | 175 | (define-button-type 'help-variable |
| 176 | :supertype 'help-xref | 176 | :supertype 'help-xref |
| 177 | 'help-function 'describe-variable | 177 | 'help-function 'describe-variable |
| 178 | 'help-echo (purecopy "mouse-2, RET: describe this variable")) | 178 | 'help-echo "mouse-2, RET: describe this variable") |
| 179 | 179 | ||
| 180 | (define-button-type 'help-type | 180 | (define-button-type 'help-type |
| 181 | :supertype 'help-xref | 181 | :supertype 'help-xref |
| 182 | 'help-function #'cl-describe-type | 182 | 'help-function #'cl-describe-type |
| 183 | 'help-echo (purecopy "mouse-2, RET: describe this type")) | 183 | 'help-echo "mouse-2, RET: describe this type") |
| 184 | 184 | ||
| 185 | (define-button-type 'help-face | 185 | (define-button-type 'help-face |
| 186 | :supertype 'help-xref | 186 | :supertype 'help-xref |
| 187 | 'help-function 'describe-face | 187 | 'help-function 'describe-face |
| 188 | 'help-echo (purecopy "mouse-2, RET: describe this face")) | 188 | 'help-echo "mouse-2, RET: describe this face") |
| 189 | 189 | ||
| 190 | (define-button-type 'help-coding-system | 190 | (define-button-type 'help-coding-system |
| 191 | :supertype 'help-xref | 191 | :supertype 'help-xref |
| 192 | 'help-function 'describe-coding-system | 192 | 'help-function 'describe-coding-system |
| 193 | 'help-echo (purecopy "mouse-2, RET: describe this coding system")) | 193 | 'help-echo "mouse-2, RET: describe this coding system") |
| 194 | 194 | ||
| 195 | (define-button-type 'help-input-method | 195 | (define-button-type 'help-input-method |
| 196 | :supertype 'help-xref | 196 | :supertype 'help-xref |
| 197 | 'help-function 'describe-input-method | 197 | 'help-function 'describe-input-method |
| 198 | 'help-echo (purecopy "mouse-2, RET: describe this input method")) | 198 | 'help-echo "mouse-2, RET: describe this input method") |
| 199 | 199 | ||
| 200 | (define-button-type 'help-character-set | 200 | (define-button-type 'help-character-set |
| 201 | :supertype 'help-xref | 201 | :supertype 'help-xref |
| 202 | 'help-function 'describe-character-set | 202 | 'help-function 'describe-character-set |
| 203 | 'help-echo (purecopy "mouse-2, RET: describe this character set")) | 203 | 'help-echo "mouse-2, RET: describe this character set") |
| 204 | 204 | ||
| 205 | ;; Make some more idiosyncratic button types. | 205 | ;; Make some more idiosyncratic button types. |
| 206 | 206 | ||
| 207 | (define-button-type 'help-symbol | 207 | (define-button-type 'help-symbol |
| 208 | :supertype 'help-xref | 208 | :supertype 'help-xref |
| 209 | 'help-function #'describe-symbol | 209 | 'help-function #'describe-symbol |
| 210 | 'help-echo (purecopy "mouse-2, RET: describe this symbol")) | 210 | 'help-echo "mouse-2, RET: describe this symbol") |
| 211 | 211 | ||
| 212 | (define-button-type 'help-back | 212 | (define-button-type 'help-back |
| 213 | :supertype 'help-xref | 213 | :supertype 'help-xref |
| 214 | 'help-function #'help-xref-go-back | 214 | 'help-function #'help-xref-go-back |
| 215 | 'help-echo (purecopy "mouse-2, RET: go back to previous help buffer")) | 215 | 'help-echo "mouse-2, RET: go back to previous help buffer") |
| 216 | 216 | ||
| 217 | (define-button-type 'help-forward | 217 | (define-button-type 'help-forward |
| 218 | :supertype 'help-xref | 218 | :supertype 'help-xref |
| 219 | 'help-function #'help-xref-go-forward | 219 | 'help-function #'help-xref-go-forward |
| 220 | 'help-echo (purecopy "mouse-2, RET: move forward to next help buffer")) | 220 | 'help-echo "mouse-2, RET: move forward to next help buffer") |
| 221 | 221 | ||
| 222 | (define-button-type 'help-info-variable | 222 | (define-button-type 'help-info-variable |
| 223 | :supertype 'help-xref | 223 | :supertype 'help-xref |
| 224 | ;; the name of the variable is put before the argument to Info | 224 | ;; the name of the variable is put before the argument to Info |
| 225 | 'help-function (lambda (_a v) (info v)) | 225 | 'help-function (lambda (_a v) (info v)) |
| 226 | 'help-echo (purecopy "mouse-2, RET: read this Info node")) | 226 | 'help-echo "mouse-2, RET: read this Info node") |
| 227 | 227 | ||
| 228 | (define-button-type 'help-info | 228 | (define-button-type 'help-info |
| 229 | :supertype 'help-xref | 229 | :supertype 'help-xref |
| 230 | 'help-function #'info | 230 | 'help-function #'info |
| 231 | 'help-echo (purecopy "mouse-2, RET: read this Info node")) | 231 | 'help-echo "mouse-2, RET: read this Info node") |
| 232 | 232 | ||
| 233 | (define-button-type 'help-man | 233 | (define-button-type 'help-man |
| 234 | :supertype 'help-xref | 234 | :supertype 'help-xref |
| 235 | 'help-function #'man | 235 | 'help-function #'man |
| 236 | 'help-echo (purecopy "mouse-2, RET: read this man page")) | 236 | 'help-echo "mouse-2, RET: read this man page") |
| 237 | 237 | ||
| 238 | (define-button-type 'help-customization-group | 238 | (define-button-type 'help-customization-group |
| 239 | :supertype 'help-xref | 239 | :supertype 'help-xref |
| 240 | 'help-function #'customize-group | 240 | 'help-function #'customize-group |
| 241 | 'help-echo (purecopy "mouse-2, RET: display this customization group")) | 241 | 'help-echo "mouse-2, RET: display this customization group") |
| 242 | 242 | ||
| 243 | (define-button-type 'help-url | 243 | (define-button-type 'help-url |
| 244 | :supertype 'help-xref | 244 | :supertype 'help-xref |
| 245 | 'help-function #'browse-url | 245 | 'help-function #'browse-url |
| 246 | 'help-echo (purecopy "mouse-2, RET: view this URL in a browser")) | 246 | 'help-echo "mouse-2, RET: view this URL in a browser") |
| 247 | 247 | ||
| 248 | (define-button-type 'help-customize-variable | 248 | (define-button-type 'help-customize-variable |
| 249 | :supertype 'help-xref | 249 | :supertype 'help-xref |
| 250 | 'help-function (lambda (v) | 250 | 'help-function (lambda (v) |
| 251 | (customize-variable v)) | 251 | (customize-variable v)) |
| 252 | 'help-echo (purecopy "mouse-2, RET: customize variable")) | 252 | 'help-echo "mouse-2, RET: customize variable") |
| 253 | 253 | ||
| 254 | (define-button-type 'help-customize-face | 254 | (define-button-type 'help-customize-face |
| 255 | :supertype 'help-xref | 255 | :supertype 'help-xref |
| 256 | 'help-function (lambda (v) | 256 | 'help-function (lambda (v) |
| 257 | (customize-face v)) | 257 | (customize-face v)) |
| 258 | 'help-echo (purecopy "mouse-2, RET: customize face")) | 258 | 'help-echo "mouse-2, RET: customize face") |
| 259 | 259 | ||
| 260 | (defun help-function-def--button-function (fun &optional file type) | 260 | (defun help-function-def--button-function (fun &optional file type) |
| 261 | (or file | 261 | (or file |
| @@ -293,7 +293,7 @@ The format is (FUNCTION ARGS...).") | |||
| 293 | (define-button-type 'help-function-def | 293 | (define-button-type 'help-function-def |
| 294 | :supertype 'help-xref | 294 | :supertype 'help-xref |
| 295 | 'help-function #'help-function-def--button-function | 295 | 'help-function #'help-function-def--button-function |
| 296 | 'help-echo (purecopy "mouse-2, RET: find function's definition")) | 296 | 'help-echo "mouse-2, RET: find function's definition") |
| 297 | 297 | ||
| 298 | (define-button-type 'help-function-cmacro ; FIXME: Obsolete since 24.4. | 298 | (define-button-type 'help-function-cmacro ; FIXME: Obsolete since 24.4. |
| 299 | :supertype 'help-xref | 299 | :supertype 'help-xref |
| @@ -314,7 +314,7 @@ The format is (FUNCTION ARGS...).") | |||
| 314 | (forward-line 0) | 314 | (forward-line 0) |
| 315 | (message "Unable to find location in file"))) | 315 | (message "Unable to find location in file"))) |
| 316 | (message "Unable to find file"))) | 316 | (message "Unable to find file"))) |
| 317 | 'help-echo (purecopy "mouse-2, RET: find function's compiler macro")) | 317 | 'help-echo "mouse-2, RET: find function's compiler macro") |
| 318 | 318 | ||
| 319 | (define-button-type 'help-variable-def | 319 | (define-button-type 'help-variable-def |
| 320 | :supertype 'help-xref | 320 | :supertype 'help-xref |
| @@ -335,7 +335,7 @@ The format is (FUNCTION ARGS...).") | |||
| 335 | (widen)) | 335 | (widen)) |
| 336 | (goto-char position)) | 336 | (goto-char position)) |
| 337 | (message "Unable to find location in file")))) | 337 | (message "Unable to find location in file")))) |
| 338 | 'help-echo (purecopy "mouse-2, RET: find variable's definition")) | 338 | 'help-echo "mouse-2, RET: find variable's definition") |
| 339 | 339 | ||
| 340 | (define-button-type 'help-face-def | 340 | (define-button-type 'help-face-def |
| 341 | :supertype 'help-xref | 341 | :supertype 'help-xref |
| @@ -357,27 +357,27 @@ The format is (FUNCTION ARGS...).") | |||
| 357 | (widen)) | 357 | (widen)) |
| 358 | (goto-char position)) | 358 | (goto-char position)) |
| 359 | (message "Unable to find location in file")))) | 359 | (message "Unable to find location in file")))) |
| 360 | 'help-echo (purecopy "mouse-2, RET: find face's definition")) | 360 | 'help-echo "mouse-2, RET: find face's definition") |
| 361 | 361 | ||
| 362 | (define-button-type 'help-package | 362 | (define-button-type 'help-package |
| 363 | :supertype 'help-xref | 363 | :supertype 'help-xref |
| 364 | 'help-function 'describe-package | 364 | 'help-function 'describe-package |
| 365 | 'help-echo (purecopy "mouse-2, RET: Describe package")) | 365 | 'help-echo "mouse-2, RET: Describe package") |
| 366 | 366 | ||
| 367 | (define-button-type 'help-package-def | 367 | (define-button-type 'help-package-def |
| 368 | :supertype 'help-xref | 368 | :supertype 'help-xref |
| 369 | 'help-function (lambda (file) (dired file)) | 369 | 'help-function (lambda (file) (dired file)) |
| 370 | 'help-echo (purecopy "mouse-2, RET: visit package directory")) | 370 | 'help-echo "mouse-2, RET: visit package directory") |
| 371 | 371 | ||
| 372 | (define-button-type 'help-theme-def | 372 | (define-button-type 'help-theme-def |
| 373 | :supertype 'help-xref | 373 | :supertype 'help-xref |
| 374 | 'help-function #'find-file | 374 | 'help-function #'find-file |
| 375 | 'help-echo (purecopy "mouse-2, RET: visit theme file")) | 375 | 'help-echo "mouse-2, RET: visit theme file") |
| 376 | 376 | ||
| 377 | (define-button-type 'help-theme-edit | 377 | (define-button-type 'help-theme-edit |
| 378 | :supertype 'help-xref | 378 | :supertype 'help-xref |
| 379 | 'help-function #'customize-create-theme | 379 | 'help-function #'customize-create-theme |
| 380 | 'help-echo (purecopy "mouse-2, RET: edit this theme file")) | 380 | 'help-echo "mouse-2, RET: edit this theme file") |
| 381 | 381 | ||
| 382 | (define-button-type 'help-dir-local-var-def | 382 | (define-button-type 'help-dir-local-var-def |
| 383 | :supertype 'help-xref | 383 | :supertype 'help-xref |
| @@ -385,7 +385,7 @@ The format is (FUNCTION ARGS...).") | |||
| 385 | ;; FIXME: this should go to the point where the | 385 | ;; FIXME: this should go to the point where the |
| 386 | ;; local variable was defined. | 386 | ;; local variable was defined. |
| 387 | (find-file file)) | 387 | (find-file file)) |
| 388 | 'help-echo (purecopy "mouse-2, RET: open directory-local variables file")) | 388 | 'help-echo "mouse-2, RET: open directory-local variables file") |
| 389 | (define-button-type 'help-news | 389 | (define-button-type 'help-news |
| 390 | :supertype 'help-xref | 390 | :supertype 'help-xref |
| 391 | 'help-function | 391 | 'help-function |
| @@ -394,7 +394,7 @@ The format is (FUNCTION ARGS...).") | |||
| 394 | (view-file file) | 394 | (view-file file) |
| 395 | (view-file-other-window file)) | 395 | (view-file-other-window file)) |
| 396 | (goto-char pos)) | 396 | (goto-char pos)) |
| 397 | 'help-echo (purecopy "mouse-2, RET: show corresponding NEWS announcement")) | 397 | 'help-echo "mouse-2, RET: show corresponding NEWS announcement") |
| 398 | 398 | ||
| 399 | ;;;###autoload | 399 | ;;;###autoload |
| 400 | (defun help-mode--add-function-link (str fun) | 400 | (defun help-mode--add-function-link (str fun) |
| @@ -446,21 +446,21 @@ Commands: | |||
| 446 | ;; similar should be done for widget doc strings, which currently use | 446 | ;; similar should be done for widget doc strings, which currently use |
| 447 | ;; another mechanism. | 447 | ;; another mechanism. |
| 448 | 448 | ||
| 449 | (defvar help-back-label (purecopy "[back]") | 449 | (defvar help-back-label "[back]" |
| 450 | "Label to use by `help-make-xrefs' for the go-back reference.") | 450 | "Label to use by `help-make-xrefs' for the go-back reference.") |
| 451 | 451 | ||
| 452 | (defvar help-forward-label (purecopy "[forward]") | 452 | (defvar help-forward-label "[forward]" |
| 453 | "Label to use by `help-make-xrefs' for the go-forward reference.") | 453 | "Label to use by `help-make-xrefs' for the go-forward reference.") |
| 454 | 454 | ||
| 455 | (defconst help-xref-symbol-regexp | 455 | (defconst help-xref-symbol-regexp |
| 456 | (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var | 456 | (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var |
| 457 | "\\(function\\|command\\|call\\)\\|" ; Link to function | 457 | "\\(function\\|command\\|call\\)\\|" ; Link to function |
| 458 | "\\(face\\)\\|" ; Link to face | 458 | "\\(face\\)\\|" ; Link to face |
| 459 | "\\(symbol\\|program\\|property\\)\\|" ; Don't link | 459 | "\\(symbol\\|program\\|property\\)\\|" ; Don't link |
| 460 | "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" | 460 | "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" |
| 461 | "[ \t\n]+\\)?" | 461 | "[ \t\n]+\\)?" |
| 462 | "\\(\\\\\\+\\)?" | 462 | "\\(\\\\\\+\\)?" |
| 463 | "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]")) | 463 | "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]") |
| 464 | "Regexp matching doc string references to symbols. | 464 | "Regexp matching doc string references to symbols. |
| 465 | 465 | ||
| 466 | The words preceding the quoted symbol can be used in doc strings to | 466 | The words preceding the quoted symbol can be used in doc strings to |
| @@ -475,21 +475,19 @@ when help commands related to multilingual environment (e.g., | |||
| 475 | 475 | ||
| 476 | 476 | ||
| 477 | (defconst help-xref-info-regexp | 477 | (defconst help-xref-info-regexp |
| 478 | (purecopy | 478 | "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]" |
| 479 | "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]") | ||
| 480 | "Regexp matching doc string references to an Info node.") | 479 | "Regexp matching doc string references to an Info node.") |
| 481 | 480 | ||
| 482 | (defconst help-xref-man-regexp | 481 | (defconst help-xref-man-regexp |
| 483 | (purecopy | 482 | "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]" |
| 484 | "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]") | ||
| 485 | "Regexp matching doc string references to a man page.") | 483 | "Regexp matching doc string references to a man page.") |
| 486 | 484 | ||
| 487 | (defconst help-xref-customization-group-regexp | 485 | (defconst help-xref-customization-group-regexp |
| 488 | (purecopy "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]") | 486 | "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]" |
| 489 | "Regexp matching doc string references to a customization group.") | 487 | "Regexp matching doc string references to a customization group.") |
| 490 | 488 | ||
| 491 | (defconst help-xref-url-regexp | 489 | (defconst help-xref-url-regexp |
| 492 | (purecopy "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]") | 490 | "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]" |
| 493 | "Regexp matching doc string references to a URL.") | 491 | "Regexp matching doc string references to a URL.") |
| 494 | 492 | ||
| 495 | ;;;###autoload | 493 | ;;;###autoload |