Mercurial > emacs
annotate lisp/cus-dep.el @ 67630:9b6d7e846996
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 16 Dec 2005 23:22:56 +0000 |
parents | e60edad917f6 |
children | 98275190ec04 |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
30884
diff
changeset
|
1 ;;; cus-dep.el --- find customization dependencies |
17393 | 2 ;; |
64762
41bb365f41c4
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64091
diff
changeset
|
3 ;; Copyright (C) 1997, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
17393 | 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 | |
64091 | 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02110-1301, USA. | |
17520 | 24 |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
30884
diff
changeset
|
25 ;;; Commentary: |
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
30884
diff
changeset
|
26 |
17393 | 27 ;;; Code: |
28 | |
28301
88b4e08f3ac1
Require CL at compile-time only.
Gerd Moellmann <gerd@gnu.org>
parents:
23099
diff
changeset
|
29 (eval-when-compile (require 'cl)) |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
30 (require 'widget) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
31 (require 'cus-face) |
17393 | 32 |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
33 (defvar generated-custom-dependencies-file "cus-load.el" |
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
34 "File \\[cusom-make-dependencies] puts custom dependencies into.") |
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
35 |
17393 | 36 (defun custom-make-dependencies () |
37 "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
|
38 Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" |
47824
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
39 (let ((enable-local-eval nil)) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
40 (set-buffer (get-buffer-create " cus-dep temp")) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
41 (dolist (subdir command-line-args-left) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
42 (message "Directory %s" subdir) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
43 (let ((files (directory-files subdir nil "\\`[^=].*\\.el\\'")) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
44 (default-directory (expand-file-name subdir)) |
47850
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
45 (preloaded (concat "\\`" |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
46 (regexp-opt (mapcar |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
47 (lambda (f) |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
48 (file-name-sans-extension |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
49 (file-name-nondirectory f))) |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
50 preloaded-file-list) t) |
48249
4da41542c6ed
Don't require 'autoload.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48187
diff
changeset
|
51 "\\.el\\'"))) |
47824
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
52 (dolist (file files) |
47850
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
53 (when (and (file-exists-p file) |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
54 ;; Ignore files that are preloaded. |
6a654788d913
(custom-make-dependencies): Ignore preloaded files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47824
diff
changeset
|
55 (not (string-match preloaded file))) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
56 (erase-buffer) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
57 (insert-file-contents file) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
58 (goto-char (point-min)) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
59 (string-match "\\`\\(.*\\)\\.el\\'" file) |
48335
ce84fde651fc
(custom-make-dependencies): Bind load-file-name.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48249
diff
changeset
|
60 (let ((name (file-name-nondirectory (match-string 1 file))) |
ce84fde651fc
(custom-make-dependencies): Bind load-file-name.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48249
diff
changeset
|
61 (load-file-name file)) |
47824
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
62 (if (save-excursion |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
63 (re-search-forward |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
64 (concat "(provide[ \t\n]+\\('\\|(quote[ \t\n]\\)[ \t\n]*" |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
65 (regexp-quote name) "[ \t\n)]") |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
66 nil t)) |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
67 (setq name (intern name))) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
68 (condition-case nil |
47824
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
69 (while (re-search-forward |
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
70 "^(def\\(custom\\|face\\|group\\)" nil t) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
71 (beginning-of-line) |
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
72 (let ((expr (read (current-buffer)))) |
21755
44c9237d9e52
(custom-make-dependencies): Don't give up
Richard M. Stallman <rms@gnu.org>
parents:
19526
diff
changeset
|
73 (condition-case nil |
47571
c26abde8fcad
(custom-make-dependencies): Bind to t around evaluating the def-form.
Richard M. Stallman <rms@gnu.org>
parents:
47557
diff
changeset
|
74 (let ((custom-dont-initialize t)) |
21755
44c9237d9e52
(custom-make-dependencies): Don't give up
Richard M. Stallman <rms@gnu.org>
parents:
19526
diff
changeset
|
75 (eval expr) |
44c9237d9e52
(custom-make-dependencies): Don't give up
Richard M. Stallman <rms@gnu.org>
parents:
19526
diff
changeset
|
76 (put (nth 1 expr) 'custom-where name)) |
44c9237d9e52
(custom-make-dependencies): Don't give up
Richard M. Stallman <rms@gnu.org>
parents:
19526
diff
changeset
|
77 (error nil)))) |
47824
f9a9cf859646
(custom-make-dependencies): Don't use find-file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47571
diff
changeset
|
78 (error nil)))))))) |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
79 (message "Generating %s..." generated-custom-dependencies-file) |
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
80 (set-buffer (find-file-noselect generated-custom-dependencies-file)) |
17393 | 81 (erase-buffer) |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
82 (insert ";;; " (file-name-nondirectory generated-custom-dependencies-file) |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
83 " --- automatically extracted custom dependencies |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
84 ;;\n;;; Code: |
17395 | 85 |
17393 | 86 ") |
87 (mapatoms (lambda (symbol) | |
88 (let ((members (get symbol 'custom-group)) | |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
89 where found) |
17393 | 90 (when members |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
91 (dolist (member |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
92 ;; So x and no-x builds won't differ. |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
93 (sort (mapcar 'car members) 'string<)) |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
94 (setq where (get member 'custom-where)) |
17393 | 95 (unless (or (null where) |
96 (member where found)) | |
97 (push where found))) | |
17473
83503d0dc576
Fixed generation of empty dependencies lists.
Per Abrahamsen <abraham@dina.kvl.dk>
parents:
17395
diff
changeset
|
98 (when found |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
99 (insert "(put '" (symbol-name symbol) |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
100 " 'custom-loads '") |
66860
e60edad917f6
(custom-make-dependencies): Reverse the list of found dependencies.
Juri Linkov <juri@jurta.org>
parents:
66851
diff
changeset
|
101 (prin1 (nreverse found) (current-buffer)) |
66851
89a5e481928a
(custom-make-dependencies): Typo.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
66788
diff
changeset
|
102 (insert ")\n")))))) |
17479 | 103 (insert "\ |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
104 ;; These are for handling :version. We need to have a minimum of |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
105 ;; information so `customize-changed-options' could do its job. |
49221
1d842f148f6e
Update the description of version handling.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
49219
diff
changeset
|
106 |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
107 ;; For groups we set `custom-version', `group-documentation' and |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
108 ;; `custom-tag' (which are shown in the customize buffer), so we |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
109 ;; don't have to load the file containing the group. |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
110 |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
111 ;; `custom-versions-load-alist' is an alist that has as car a version |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
112 ;; number and as elts the files that have variables or faces that |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
113 ;; contain that version. These files should be loaded before showing |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
114 ;; the customization buffer that `customize-changed-options' |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
115 ;; generates. |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
116 |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
117 ;; This macro is used so we don't modify the information about |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
118 ;; variables and groups if it's already set. (We don't know when |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
119 ;; " (file-name-nondirectory generated-custom-dependencies-file) |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
120 " is going to be loaded and at that time some of the |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
121 ;; files might be loaded and some others might not). |
30884
a6155f9c1e66
(custom-make-dependencies): Quote open-paren in string.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
30883
diff
changeset
|
122 \(defmacro custom-put-if-not (symbol propname value) |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
123 `(unless (get ,symbol ,propname) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
124 (put ,symbol ,propname ,value))) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
125 |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
126 ") |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
127 (let ((version-alist nil)) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
128 (mapatoms (lambda (symbol) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
129 (let ((version (get symbol 'custom-version)) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
130 where) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49221
diff
changeset
|
131 (when version |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
132 (setq where (get symbol 'custom-where)) |
48249
4da41542c6ed
Don't require 'autoload.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48187
diff
changeset
|
133 (when where |
49219
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
134 (if (or (custom-variable-p symbol) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
135 (custom-facep symbol)) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
136 ;; This means it's a variable or a face. |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
137 (progn |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
138 (if (assoc version version-alist) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49221
diff
changeset
|
139 (unless |
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49221
diff
changeset
|
140 (member where |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
141 (cdr (assoc version version-alist))) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
142 (push where (cdr (assoc version version-alist)))) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
143 (push (cons version (list where)) version-alist))) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
144 ;; This is a group |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49221
diff
changeset
|
145 (insert "(custom-put-if-not '" (symbol-name symbol) |
49219
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
146 " 'custom-version ") |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
147 (prin1 version (current-buffer)) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
148 (insert ")\n") |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
149 (insert "(custom-put-if-not '" (symbol-name symbol)) |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
150 (insert " 'group-documentation ") |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
151 (prin1 (get symbol 'group-documentation) (current-buffer)) |
49219
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
152 (insert ")\n") |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
153 (when (get symbol 'custom-tag) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
154 (insert "(custom-put-if-not '" (symbol-name symbol)) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
155 (insert " 'custom-tag ") |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
156 (prin1 (get symbol 'custom-tag) (current-buffer)) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
157 (insert ")\n")) |
e53c0b341ec5
(custom-make-dependencies): Don't set standard-value
Markus Rost <rost@math.uni-bielefeld.de>
parents:
48992
diff
changeset
|
158 )))))) |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
159 |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
160 (insert "\n(defvar custom-versions-load-alist " |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
161 (if version-alist "'" "")) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
162 (prin1 version-alist (current-buffer)) |
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
163 (insert "\n \"For internal use by custom.\")\n")) |
49588
37645a051842
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49221
diff
changeset
|
164 |
22538
2649d061d370
*** empty log message ***
Dan Nicolaescu <done@ece.arizona.edu>
parents:
21755
diff
changeset
|
165 (insert "\ |
17479 | 166 |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
167 \(provide '" (file-name-sans-extension |
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
168 (file-name-nondirectory generated-custom-dependencies-file)) ") |
17479 | 169 |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
170 ;; Local Variables: |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
171 ;; version-control: never |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
172 ;; no-byte-compile: t |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
173 ;; no-update-autoloads: t |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
174 ;; End:\n;;; " |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
175 (file-name-nondirectory generated-custom-dependencies-file) |
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
176 " ends here\n") |
17685
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
177 (let ((kept-new-versions 10000000)) |
3a1471ba9387
(custom-make-dependencies):
Richard M. Stallman <rms@gnu.org>
parents:
17520
diff
changeset
|
178 (save-buffer)) |
48992
1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
Andreas Schwab <schwab@suse.de>
parents:
48335
diff
changeset
|
179 (message "Generating %s...done" generated-custom-dependencies-file) |
17744
2522a70cd009
(custom-make-dependencies): Don't find the subdirs here;
Richard M. Stallman <rms@gnu.org>
parents:
17685
diff
changeset
|
180 (kill-emacs)) |
17393 | 181 |
30883
869204bacd5f
Add local-variable settings to the generated file.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28301
diff
changeset
|
182 |
52401 | 183 |
66788
a6268c7db403
(custom-make-dependencies): Simplify.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
64762
diff
changeset
|
184 ;; arch-tag: b7b6421a-bf7a-44fd-a382-6f44976bdf68 |
17393 | 185 ;;; cus-dep.el ends here |