Mercurial > hg > xemacs-beta
annotate lib-src/config.values.sh @ 5327:d1b17a33450b
Move the heavy lifting from cl-seq.el to C.
src/ChangeLog addition:
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
Move the heavy lifting from cl-seq.el to C, finally making those
functions first-class XEmacs citizens, with circularity checking,
built-in support for tests other than #'eql, and as much
compatibility with current Common Lisp as Paul Dietz' tests require.
* fns.c (check_eq_nokey, check_eq_key, check_eql_nokey)
(check_eql_key, check_equal_nokey, check_equal_key)
(check_equalp_nokey, check_equalp_key, check_string_match_nokey)
(check_string_match_key, check_other_nokey, check_other_key)
(check_if_nokey, check_if_key, check_match_eq_key)
(check_match_eql_key, check_match_equal_key)
(check_match_equalp_key, check_match_other_key): New. These are
basically to provide function pointers to be used by Lisp
functions that take TEST, TEST-NOT and KEY arguments.
(get_check_match_function_1, get_check_test_function)
(get_check_match_function): These functions work out which of the
previous list of functions to use, given the keywords supplied by
the user.
(count_with_tail): New. This is the bones of #'count.
(list_count_from_end, string_count_from_end): Utility functions
for #'count.
(Fcount): New, moved from cl-seq.el.
(list_position_cons_before): New. The implementation of #'member*,
and important in implementing various other functions.
(FmemberX, Fadjoin, FassocX, FrassocX, Fposition, Ffind)
(FdeleteX, FremoveX, Fdelete_duplicates, Fremove_duplicates)
(Fnsubstitute, Fsubstitute, Fsublis, Fnsublis, Fsubst, Fnsubst)
(Ftree_equal, Fmismatch, Fsearch, Fintersection, Fnintersection)
(Fsubsetp, Fset_difference, Fnset_difference, Fnunion, Funion)
(Fset_exclusive_or, Fnset_exclusive_or): New, moved here from
cl-seq.el.
(position): New. The implementation of #'find and #'position.
(list_delete_duplicates_from_end, subst, sublis, nsublis)
(tree_equal, mismatch_from_end, mismatch_list_list)
(mismatch_list_string, mismatch_list_array)
(mismatch_string_array, mismatch_string_string)
(mismatch_array_array, get_mismatch_func): Helper C functions for
the Lisp-visible functions.
(venn, nvenn): New. The implementation of the main Lisp functions that
treat lists as sets.
lisp/ChangeLog addition:
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* cl-seq.el:
Move the heavy lifting from this file to C. Dump the
cl-parsing-keywords macro, but don't use defun* for the functions
we define that do take keywords, dynamic scope lossage makes that
not practical.
* subr.el (sort, fillarray): Move these aliases here.
(map-plist): #'nsublis is now built-in, but at this point #'eql
isn't necessarily available as a test; use #'eq.
* obsolete.el (cl-delete-duplicates): Make this available for old
compiler macros and old code.
(memql): Document that this is equivalent to #'member*, and worse.
* cl.el (adjoin, subst): Removed. These are in C.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 30 Dec 2010 01:59:52 +0000 |
parents | e6508b64ee08 |
children | b9167d522a9a |
rev | line source |
---|---|
434 | 1 : #-*- Perl -*- |
2 eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge | |
3 if 0; | |
4 | |
428 | 5 # config.values.sh --- create config.values.in from ../configure |
6 | |
5290
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
2651
diff
changeset
|
7 # Copyright (C) 1997, 1999 Martin Buchholz |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
2651
diff
changeset
|
8 |
428 | 9 # Author: Martin Buchholz |
10 # Maintainer: Martin Buchholz | |
11 # Keywords: configure elisp report-xemacs-bugs | |
12 | |
13 # This file is part of XEmacs. | |
14 | |
15 # XEmacs is free software; you can redistribute it and/or modify it | |
16 # under the terms of the GNU General Public License as published by | |
17 # the Free Software Foundation; either version 2, or (at your option) | |
18 # any later version. | |
19 | |
20 # XEmacs is distributed in the hope that it will be useful, but | |
21 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
23 # General Public License for more details. | |
24 | |
25 # You should have received a copy of the GNU General Public License | |
26 # along with XEmacs; see the file COPYING. If not, write to | |
27 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
28 # Boston, MA 02111-1307, USA. | |
29 | |
30 ### Commentary: | |
31 | |
32 ## Extract all the @foo@ configuration symbols from ../configure | |
33 ## to make them available to elisp later (see util/config.el) | |
34 ## Primarily useful for creating ridiculously verbose bug reports. | |
35 ## | |
543 | 36 ## See lisp/config.el, ../configure.in, |
428 | 37 ## and the Autoconf documentation on AC_OUTPUT, for more details. |
38 ## | |
39 ## This script needs only to be run occasionally (before a Net release) | |
40 ## by an XEmacs Maintainer (consider yourself so blessed, if you are | |
41 ## actually reading this commentary). | |
42 ## | |
434 | 43 |
44 if (! -r "./configure") { | |
45 chdir ".." or die "Can't chdir: $!"; | |
46 if (! -r "./configure") { | |
47 die "Can't find configure!"; | |
48 } | |
49 } | |
428 | 50 |
434 | 51 sub FileContents { |
52 local $/ = undef; # Slurp mode | |
53 open (FILE, "< $_[0]") or die "$_[0]: $!"; | |
54 my $contents = <FILE>; | |
55 close FILE or die "$_[0]: $!"; | |
56 return $contents; | |
57 } | |
58 | |
59 my $configure_contents = FileContents "./configure"; | |
60 my $cvi_contents = FileContents "lib-src/config.values.in"; | |
61 | |
62 my $new_cvi_contents = | |
63 ";;; Do not edit this file! | |
428 | 64 ;;; This file was automatically generated, by the config.values.sh script, |
65 ;;; from configure, which was itself automatically generated from configure.in. | |
66 ;;; | |
543 | 67 ;;; See lisp/config.el for details on how this file is used. |
428 | 68 ;;; |
69 ;;; You are trapped in a twisty maze of strange-looking files, all autogenerated... | |
70 | |
71 ;;; configure is created, from configure.in, by autoconf | |
72 ;;; config.values.in is created, from configure, by config.values.sh | |
73 ;;; config.values is created, from config.values.in, by configure | |
543 | 74 ;;; config.values is read by lisp/config.el, |
428 | 75 ;;; to create the (Lisp object) config-value-hash-table |
76 | |
77 ;;; Variables defined in configure by AC_SUBST follow: | |
78 ;;; (These are used in Makefiles) | |
79 | |
434 | 80 "; |
428 | 81 |
434 | 82 my %done; |
83 for my $var (sort { $a cmp $b } | |
84 $configure_contents =~ | |
2651 | 85 /^s\,\@([A-Za-z0-9_]+)\@\,\$[A-Za-z0-9_]+\,;t t/mg) { |
434 | 86 $new_cvi_contents .= "$var \"\@$var\@\"\n" unless exists $done{$var}; |
87 $done{$var} = 1; | |
88 } | |
89 | |
90 $new_cvi_contents .= " | |
428 | 91 ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow: |
92 ;;; (These are used in C code) | |
93 | |
434 | 94 "; |
95 | |
96 if ($cvi_contents ne $new_cvi_contents) { | |
97 unlink "lib-src/config.values.in"; | |
98 open (CVI, "> lib-src/config.values.in") | |
99 or die "lib-src/config.values.in: $!"; | |
100 print CVI $new_cvi_contents; | |
101 close CVI | |
102 or die "lib-src/config.values.in: $!"; | |
103 } |