Mercurial > emacs
annotate lisp/cus-dep.el @ 20892:18f3cb26243f before-miles-orphaned-changes gcc-2_8_1-980401 gcc-2_8_1-980407 gcc-2_8_1-980412 gcc-2_8_1-980413 gcc-2_8_1-RELEASE gcc_2_8_1-980315 libc-980214 libc-980215 libc-980216 libc-980217 libc-980218 libc-980219 libc-980220 libc-980221 libc-980222 libc-980223 libc-980224 libc-980225 libc-980226 libc-980227 libc-980228 libc-980301 libc-980302 libc-980303 libc-980304 libc-980306 libc-980307 libc-980308 libc-980309 libc-980310 libc-980311 libc-980312 libc-980313 libc-980314 libc-980315 libc-980316 libc-980317 libc-980318 libc-980319 libc-980320 libc-980321 libc-980322 libc-980323 libc-980324 libc-980325 libc-980326 libc-980327 libc-980328 libc-980329 libc-980330 libc-980331 libc-980401 libc-980402 libc-980403 libc-980404 libc-980405 libc-980406 libc-980407 libc-980408 libc-980409 libc-980410 libc-980411 libc-980412 libc-980413 libc-980414 libc-980428 libc-980429 libc-980430 libc-980501 libc-980502 libc-980503 libc-980504 libc-980505 libc-980506 libc-980507 libc-980508 libc-980509 libc-980510 libc-980512 libc-980513 libc-980514 libc-980515 libc-980516 libc-980517 libc-980518 libc-980519 libc-980520 libc-980521 libc-980522 libc-980523 libc-980524 libc-980525 libc-980526 libc-980527 libc-980528 libc-980529 libc-980530 libc-980531 libc-980601 libc-980602 libc-980603 libc-980604 libc-980605 libc-980606 libc-980607 libc-980608 libc-980609 libc-980610 libc-980611 libc-980612 libc-980613
Add PentiumII (i786). Add '7' to all i[3456] entries.
Add AMD and Cyrix names for P5 and P6.
author | Richard Kenner <kenner@gnu.org> |
---|---|
date | Fri, 13 Feb 1998 12:16:46 +0000 |
parents | bbad6a02f725 |
children | 44c9237d9e52 |
rev | line source |
---|---|
17393 | 1 ;;; cus-dep.el --- Find customization dependencies. |
2 ;; | |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | |
4 ;; | |
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | |
6 ;; Keywords: internal | |
7 | |
17520 | 8 ;; This file is part of GNU Emacs. |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
17393 | 25 ;;; Code: |
26 | |
27 (require 'cl) | |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
28 (require 'widget) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
29 (require 'cus-face) |
17393 | 30 |
31 (defun custom-make-dependencies () | |
32 "Batch function to extract custom dependencies from .el files. | |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
33 Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" |
17393 | 34 (let ((enable-local-eval nil) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
35 (all-subdirs command-line-args-left) |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
36 (start-directory default-directory)) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
37 (get-buffer-create " cus-dep temp") |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
38 (set-buffer " cus-dep temp") |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
39 (while all-subdirs |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
40 (message "Directory %s" (car all-subdirs)) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
41 (let ((files (directory-files (car all-subdirs) nil "\\`[^=].*\\.el\\'")) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
42 (default-directory default-directory) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
43 file) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
44 (cd (car all-subdirs)) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
45 (while files |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
46 (setq file (car files) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
47 files (cdr files)) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
48 (when (file-exists-p file) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
49 (erase-buffer) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
50 (insert-file-contents file) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
51 (goto-char (point-min)) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
52 (string-match "\\`\\(.*\\)\\.el\\'" file) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
53 (let ((name (file-name-nondirectory (match-string 1 file)))) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
54 (condition-case nil |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
55 (while (re-search-forward "^(defcustom\\|^(defface\\|^(defgroup" |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
56 nil t) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
57 (beginning-of-line) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
58 (let ((expr (read (current-buffer)))) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
59 (eval expr) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
60 (put (nth 1 expr) 'custom-where name))) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
61 (error nil))))) |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
62 (setq all-subdirs (cdr all-subdirs))))) |
17393 | 63 (message "Generating cus-load.el...") |
64 (find-file "cus-load.el") | |
65 (erase-buffer) | |
66 (insert "\ | |
67 ;;; cus-load.el --- automatically extracted custom dependencies | |
68 ;; | |
69 ;;; Code: | |
17395 | 70 |
17393 | 71 ") |
72 (mapatoms (lambda (symbol) | |
73 (let ((members (get symbol 'custom-group)) | |
74 item where found) | |
75 (when members | |
76 (while members | |
77 (setq item (car (car members)) | |
78 members (cdr members) | |
79 where (get item 'custom-where)) | |
80 (unless (or (null where) | |
81 (member where found)) | |
82 (if found | |
83 (insert " ") | |
84 (insert "(put '" (symbol-name symbol) | |
85 " 'custom-loads '(")) | |
17473
83503d0dc576
Fixed generation of empty dependencies lists.
Per Abrahamsen <abraham@dina.kvl.dk>
parents:
17395
diff
changeset
|
86 (prin1 where (current-buffer)) |
17393 | 87 (push where found))) |
17473
83503d0dc576
Fixed generation of empty dependencies lists.
Per Abrahamsen <abraham@dina.kvl.dk>
parents:
17395
diff
changeset
|
88 (when found |
83503d0dc576
Fixed generation of empty dependencies lists.
Per Abrahamsen <abraham@dina.kvl.dk>
parents:
17395
diff
changeset
|
89 (insert "))\n")))))) |
17479 | 90 (insert "\ |
91 | |
92 \(provide 'cus-load) | |
93 | |
94 ;;; cus-load.el ends here\n") | |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
95 (let ((kept-new-versions 10000000)) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
96 (save-buffer)) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
97 (message "Generating cus-load.el...done") |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
98 (kill-emacs)) |
17393 | 99 |
100 ;;; cus-dep.el ends here |