diff options
| author | Noam Postavsky | 2019-07-05 22:26:13 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-07-06 14:34:47 -0400 |
| commit | 1f7b602f843d82d2da46528c6cc2a16c794ca668 (patch) | |
| tree | b086a1eef2ac989a4acca5304e0537f67ad10d69 | |
| parent | 99a7a188ec052ffcae06ffe49ffe29ccbc2c50ee (diff) | |
| download | emacs-1f7b602f843d82d2da46528c6cc2a16c794ca668.tar.gz emacs-1f7b602f843d82d2da46528c6cc2a16c794ca668.zip | |
Add commentary about #$ in autoload files
* lisp/emacs-lisp/autoload.el (autoload-rubric): Add commentary about
`#$' trick.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 21b8caccf4b..dfcf17ce1e8 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -370,7 +370,11 @@ FILE's name." | |||
| 370 | ";;\n" | 370 | ";;\n" |
| 371 | ";;; Code:\n\n" | 371 | ";;; Code:\n\n" |
| 372 | (if lp | 372 | (if lp |
| 373 | ;; `load-path' should contain only directory names. | 373 | ;; Use the `#$' to indicate current file, from which |
| 374 | ;; we extract the directory name. Note that | ||
| 375 | ;; `package-quickstart-refresh' specifically replaces | ||
| 376 | ;; `#$', so any other tricks (e.g., `load-file-name') | ||
| 377 | ;; will not work for that case. | ||
| 374 | "(add-to-list 'load-path (directory-file-name | 378 | "(add-to-list 'load-path (directory-file-name |
| 375 | (or (file-name-directory #$) (car load-path))))\n\n") | 379 | (or (file-name-directory #$) (car load-path))))\n\n") |
| 376 | "\n" | 380 | "\n" |
| @@ -381,7 +385,7 @@ FILE's name." | |||
| 381 | (file-name-sans-extension basename)))) | 385 | (file-name-sans-extension basename)))) |
| 382 | ";; Local Variables:\n" | 386 | ";; Local Variables:\n" |
| 383 | ";; version-control: never\n" | 387 | ";; version-control: never\n" |
| 384 | ";; no-byte-compile: t\n" | 388 | ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil. |
| 385 | ";; no-update-autoloads: t\n" | 389 | ";; no-update-autoloads: t\n" |
| 386 | ";; coding: utf-8\n" | 390 | ";; coding: utf-8\n" |
| 387 | ";; End:\n" | 391 | ";; End:\n" |