diff options
| author | Eli Zaretskii | 2013-04-19 11:42:34 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-19 11:42:34 +0300 |
| commit | 1c0977a9516b7df0ca30d28abf42a618a66b9989 (patch) | |
| tree | a634ecaf499125db8db7b991828d47f962dc3924 | |
| parent | 4cf86a2fa737296d26e8a02338e2bf6f26e1133a (diff) | |
| download | emacs-1c0977a9516b7df0ca30d28abf42a618a66b9989.tar.gz emacs-1c0977a9516b7df0ca30d28abf42a618a66b9989.zip | |
Add reveal-filename function instead of 3 set-generated-*-file funcs, as suggested by Glenn Morris.
| -rw-r--r-- | lisp/Makefile.in | 16 | ||||
| -rw-r--r-- | lisp/cus-dep.el | 12 | ||||
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 12 | ||||
| -rw-r--r-- | lisp/finder.el | 12 | ||||
| -rw-r--r-- | lisp/subr.el | 16 |
5 files changed, 24 insertions, 44 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 1a411e67ff4..9e56d835b6d 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -164,21 +164,21 @@ $(lisp)/cus-load.el: | |||
| 164 | custom-deps: doit | 164 | custom-deps: doit |
| 165 | cd $(lisp); $(setwins_almost); \ | 165 | cd $(lisp); $(setwins_almost); \ |
| 166 | echo Directories: $$wins; \ | 166 | echo Directories: $$wins; \ |
| 167 | $(emacs) -l cus-dep --eval '(set-generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins | 167 | $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file (reveal-filename "$(lisp)/cus-load.el"))' -f custom-make-dependencies $$wins |
| 168 | 168 | ||
| 169 | $(lisp)/finder-inf.el: | 169 | $(lisp)/finder-inf.el: |
| 170 | $(MAKE) $(MFLAGS) finder-data | 170 | $(MAKE) $(MFLAGS) finder-data |
| 171 | finder-data: doit | 171 | finder-data: doit |
| 172 | cd $(lisp); $(setwins_almost); \ | 172 | cd $(lisp); $(setwins_almost); \ |
| 173 | echo Directories: $$wins; \ | 173 | echo Directories: $$wins; \ |
| 174 | $(emacs) -l finder --eval '(set-generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins | 174 | $(emacs) -l finder --eval '(setq generated-finder-keywords-file (reveal-filename "$(lisp)/finder-inf.el"))' -f finder-compile-keywords-make-dist $$wins |
| 175 | 175 | ||
| 176 | # The chmod +w is to handle env var CVSREAD=1. | 176 | # The chmod +w is to handle env var CVSREAD=1. |
| 177 | autoloads: $(LOADDEFS) doit | 177 | autoloads: $(LOADDEFS) doit |
| 178 | cd $(lisp) && chmod +w $(AUTOGEN_VCS) | 178 | cd $(lisp) && chmod +w $(AUTOGEN_VCS) |
| 179 | cd $(lisp); $(setwins_almost); \ | 179 | cd $(lisp); $(setwins_almost); \ |
| 180 | echo Directories: $$wins; \ | 180 | echo Directories: $$wins; \ |
| 181 | $(emacs) -l autoload --eval '(set-generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins | 181 | $(emacs) -l autoload --eval '(setq generated-autoload-file (reveal-filename "$(lisp)/loaddefs.el"))' -f batch-update-autoloads $$wins |
| 182 | 182 | ||
| 183 | # This is required by the bootstrap-emacs target in ../src/Makefile, so | 183 | # This is required by the bootstrap-emacs target in ../src/Makefile, so |
| 184 | # we know that if we have an emacs executable, we also have a subdirs.el. | 184 | # we know that if we have an emacs executable, we also have a subdirs.el. |
| @@ -373,7 +373,7 @@ mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el | |||
| 373 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) | 373 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) |
| 374 | $(emacs) -l autoload \ | 374 | $(emacs) -l autoload \ |
| 375 | --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ | 375 | --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ |
| 376 | --eval "(set-generated-autoload-file \"$@\")" \ | 376 | --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \ |
| 377 | --eval "(setq make-backup-files nil)" \ | 377 | --eval "(setq make-backup-files nil)" \ |
| 378 | -f batch-update-autoloads $(MH_E_DIR) | 378 | -f batch-update-autoloads $(MH_E_DIR) |
| 379 | 379 | ||
| @@ -391,7 +391,7 @@ TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \ | |||
| 391 | $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) | 391 | $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) |
| 392 | $(emacs) -l autoload \ | 392 | $(emacs) -l autoload \ |
| 393 | --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \ | 393 | --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \ |
| 394 | --eval "(set-generated-autoload-file \"$@\")" \ | 394 | --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \ |
| 395 | --eval "(setq make-backup-files nil)" \ | 395 | --eval "(setq make-backup-files nil)" \ |
| 396 | -f batch-update-autoloads $(TRAMP_DIR) | 396 | -f batch-update-autoloads $(TRAMP_DIR) |
| 397 | 397 | ||
| @@ -413,21 +413,21 @@ CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el \ | |||
| 413 | $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) | 413 | $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) |
| 414 | $(emacs) -l autoload \ | 414 | $(emacs) -l autoload \ |
| 415 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ | 415 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ |
| 416 | --eval "(set-generated-autoload-file \"$@\")" \ | 416 | --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \ |
| 417 | --eval "(setq make-backup-files nil)" \ | 417 | --eval "(setq make-backup-files nil)" \ |
| 418 | -f batch-update-autoloads $(CAL_DIR) | 418 | -f batch-update-autoloads $(CAL_DIR) |
| 419 | 419 | ||
| 420 | $(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) | 420 | $(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) |
| 421 | $(emacs) -l autoload \ | 421 | $(emacs) -l autoload \ |
| 422 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ | 422 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ |
| 423 | --eval "(set-generated-autoload-file \"$@\")" \ | 423 | --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \ |
| 424 | --eval "(setq make-backup-files nil)" \ | 424 | --eval "(setq make-backup-files nil)" \ |
| 425 | -f batch-update-autoloads $(CAL_DIR) | 425 | -f batch-update-autoloads $(CAL_DIR) |
| 426 | 426 | ||
| 427 | $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) | 427 | $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) |
| 428 | $(emacs) -l autoload \ | 428 | $(emacs) -l autoload \ |
| 429 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ | 429 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ |
| 430 | --eval "(set-generated-autoload-file \"$@\")" \ | 430 | --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \ |
| 431 | --eval "(setq make-backup-files nil)" \ | 431 | --eval "(setq make-backup-files nil)" \ |
| 432 | -f batch-update-autoloads $(CAL_DIR) | 432 | -f batch-update-autoloads $(CAL_DIR) |
| 433 | 433 | ||
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index fd679ee3088..60b427344ea 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el | |||
| @@ -38,18 +38,6 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)" | |||
| 38 | 38 | ||
| 39 | (autoload 'autoload-rubric "autoload") | 39 | (autoload 'autoload-rubric "autoload") |
| 40 | 40 | ||
| 41 | (defun set-generated-custom-dependencies-file (file) | ||
| 42 | "Set value of `generated-custom-dependencies-file' from FILE. | ||
| 43 | |||
| 44 | On systems other than MS-Windows, just sets the value | ||
| 45 | of `generated-custom-dependencies-file'. On MS-Windows, converts | ||
| 46 | /d/foo/bar form passed by MSYS Make into d:/foo/bar that Emacs can | ||
| 47 | grok. This function is called from lisp/Makefile." | ||
| 48 | (when (and (eq system-type 'windows-nt) | ||
| 49 | (string-match "\\`/[a-zA-Z]/" file)) | ||
| 50 | (setq file (concat (substring file 1 2) ":" (substring file 2)))) | ||
| 51 | (setq generated-custom-dependencies-file file)) | ||
| 52 | |||
| 53 | (defun custom-make-dependencies () | 41 | (defun custom-make-dependencies () |
| 54 | "Batch function to extract custom dependencies from .el files. | 42 | "Batch function to extract custom dependencies from .el files. |
| 55 | Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" | 43 | Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index f9e691c153c..edaecd7ff19 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -86,18 +86,6 @@ that text will be copied verbatim to `generated-autoload-file'.") | |||
| 86 | 86 | ||
| 87 | (defvar autoload-modified-buffers) ;Dynamically scoped var. | 87 | (defvar autoload-modified-buffers) ;Dynamically scoped var. |
| 88 | 88 | ||
| 89 | (defun set-generated-autoload-file (file) | ||
| 90 | "Set value of `generated-autoload-file' from FILE. | ||
| 91 | |||
| 92 | On systems other than MS-Windows, just sets the value | ||
| 93 | of `generated-autoload-file'. On MS-Windows, converts /d/foo/bar | ||
| 94 | form passed by MSYS Make into d:/foo/bar that Emacs can grok. | ||
| 95 | This function is called from lisp/Makefile." | ||
| 96 | (when (and (eq system-type 'windows-nt) | ||
| 97 | (string-match "\\`/[a-zA-Z]/" file)) | ||
| 98 | (setq file (concat (substring file 1 2) ":" (substring file 2)))) | ||
| 99 | (setq generated-autoload-file file)) | ||
| 100 | |||
| 101 | (defun make-autoload (form file &optional expansion) | 89 | (defun make-autoload (form file &optional expansion) |
| 102 | "Turn FORM into an autoload or defvar for source file FILE. | 90 | "Turn FORM into an autoload or defvar for source file FILE. |
| 103 | Returns nil if FORM is not a special autoload form (i.e. a function definition | 91 | Returns nil if FORM is not a special autoload form (i.e. a function definition |
diff --git a/lisp/finder.el b/lisp/finder.el index 8da589655d7..3d988b41bde 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -138,18 +138,6 @@ cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)" | |||
| 138 | 138 | ||
| 139 | (autoload 'autoload-rubric "autoload") | 139 | (autoload 'autoload-rubric "autoload") |
| 140 | 140 | ||
| 141 | (defun set-generated-finder-keywords-file (file) | ||
| 142 | "Set value of `generated-finder-keywords-file' from FILE. | ||
| 143 | |||
| 144 | On systems other than MS-Windows, just sets the value | ||
| 145 | of `generated-finder-keywords-file'. On MS-Windows, converts | ||
| 146 | /d/foo/bar form passed by MSYS Make into d:/foo/bar that Emacs | ||
| 147 | can grok. This function is called from lisp/Makefile." | ||
| 148 | (when (and (eq system-type 'windows-nt) | ||
| 149 | (string-match "\\`/[a-zA-Z]/" file)) | ||
| 150 | (setq file (concat (substring file 1 2) ":" (substring file 2)))) | ||
| 151 | (setq generated-finder-keywords-file file)) | ||
| 152 | |||
| 153 | (defvar finder--builtins-alist | 141 | (defvar finder--builtins-alist |
| 154 | '(("calc" . calc) | 142 | '(("calc" . calc) |
| 155 | ("ede" . ede) | 143 | ("ede" . ede) |
diff --git a/lisp/subr.el b/lisp/subr.el index 7fe3d411580..dc968542cd0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4655,4 +4655,20 @@ as alpha versions." | |||
| 4655 | (prin1-to-string (make-hash-table))))) | 4655 | (prin1-to-string (make-hash-table))))) |
| 4656 | (provide 'hashtable-print-readable)) | 4656 | (provide 'hashtable-print-readable)) |
| 4657 | 4657 | ||
| 4658 | ;; This is used in lisp/Makefile.in to generate file names for | ||
| 4659 | ;; autoloads, custom-deps, and finder-data. | ||
| 4660 | (defun reveal-filename (file) | ||
| 4661 | "Produce the real file name for FILE. | ||
| 4662 | |||
| 4663 | On systems other than MS-Windows, just returns FILE. | ||
| 4664 | On MS-Windows, converts /d/foo/bar form of file names | ||
| 4665 | passed by MSYS Make into d:/foo/bar that Emacs can grok. | ||
| 4666 | |||
| 4667 | This function is called from lisp/Makefile." | ||
| 4668 | (when (and (eq system-type 'windows-nt) | ||
| 4669 | (string-match "\\`/[a-zA-Z]/" file)) | ||
| 4670 | (setq file (concat (substring file 1 2) ":" (substring file 2)))) | ||
| 4671 | file) | ||
| 4672 | |||
| 4673 | |||
| 4658 | ;;; subr.el ends here | 4674 | ;;; subr.el ends here |