Mercurial > hg > xemacs-beta
annotate lib-src/config.values.sh @ 5803:b79e1e02bf01
Preserve extent information in the command builder code.
src/ChangeLog addition:
2014-07-14 Aidan Kehoe <kehoea@parhasard.net>
* event-stream.c:
* event-stream.c (mark_command_builder):
* event-stream.c (finalize_command_builder): Removed.
* event-stream.c (allocate_command_builder):
* event-stream.c (free_command_builder): Removed. Use
free_normal_lisp_object() instead.
* event-stream.c (echo_key_event):
* event-stream.c (regenerate_echo_keys_from_this_command_keys):
Detach all extents here.
* event-stream.c (maybe_echo_keys):
* event-stream.c (reset_key_echo):
* event-stream.c (execute_help_form):
* event-stream.c (Fnext_event):
* event-stream.c (command_builder_find_leaf_no_jit_binding):
* event-stream.c (command_builder_find_leaf):
* event-stream.c (lookup_command_event):
* events.h (struct command_builder):
Move the command builder's echo_buf to being a Lisp string rather
than a malloced Ibyte array. This allows passing through extent
information, which was previously dropped. It also simplifies the
allocation and release code for the command builder.
Rename echo_buf_index to echo_buf_fill_pointer, better reflecting
its function.
Don't rely on zero-termination (something not particularly
compatible with Lisp-level code) when showing a substring of
echo_buf that differs from that designated by
echo_buf_fill_pointer, keep a separate counter instead and use
that.
* minibuf.c:
* minibuf.c (echo_area_append):
Use the new START and END keyword arguments to #'append-message,
rather than consing a new string for basically every #'next-event
prompt displayed.
test/ChangeLog addition:
2014-07-14 Aidan Kehoe <kehoea@parhasard.net>
* automated/extent-tests.el:
Check that extent information is passed through to the echo area
correctly with #'next-event's PROMPT argument.
lisp/ChangeLog addition:
2014-07-14 Aidan Kehoe <kehoea@parhasard.net>
* simple.el (raw-append-message):
Use #'write-sequence in this, take its START and END keyword
arguments, so our callers don't have to cons as much.
* simple.el (append-message):
Pass through START and END here.
| author | Aidan Kehoe <kehoea@parhasard.net> |
|---|---|
| date | Mon, 14 Jul 2014 13:42:42 +0100 |
| parents | b9167d522a9a |
| children |
| 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. | |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
14 # |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
15 # XEmacs is free software: you can redistribute it and/or modify it |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
16 # under the terms of the GNU General Public License as published by the |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
17 # Free Software Foundation, either version 3 of the License, or (at your |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
18 # option) any later version. |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
19 # |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
20 # XEmacs is distributed in the hope that it will be useful, but WITHOUT |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
21 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
22 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
23 # for more details. |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
24 # |
| 428 | 25 # You should have received a copy of the GNU General Public License |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2651
diff
changeset
|
26 # along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
| 428 | 27 |
| 28 ### Commentary: | |
| 29 | |
| 30 ## Extract all the @foo@ configuration symbols from ../configure | |
| 31 ## to make them available to elisp later (see util/config.el) | |
| 32 ## Primarily useful for creating ridiculously verbose bug reports. | |
| 33 ## | |
| 543 | 34 ## See lisp/config.el, ../configure.in, |
| 428 | 35 ## and the Autoconf documentation on AC_OUTPUT, for more details. |
| 36 ## | |
| 37 ## This script needs only to be run occasionally (before a Net release) | |
| 38 ## by an XEmacs Maintainer (consider yourself so blessed, if you are | |
| 39 ## actually reading this commentary). | |
| 40 ## | |
| 434 | 41 |
| 42 if (! -r "./configure") { | |
| 43 chdir ".." or die "Can't chdir: $!"; | |
| 44 if (! -r "./configure") { | |
| 45 die "Can't find configure!"; | |
| 46 } | |
| 47 } | |
| 428 | 48 |
| 434 | 49 sub FileContents { |
| 50 local $/ = undef; # Slurp mode | |
| 51 open (FILE, "< $_[0]") or die "$_[0]: $!"; | |
| 52 my $contents = <FILE>; | |
| 53 close FILE or die "$_[0]: $!"; | |
| 54 return $contents; | |
| 55 } | |
| 56 | |
| 57 my $configure_contents = FileContents "./configure"; | |
| 58 my $cvi_contents = FileContents "lib-src/config.values.in"; | |
| 59 | |
| 60 my $new_cvi_contents = | |
| 61 ";;; Do not edit this file! | |
| 428 | 62 ;;; This file was automatically generated, by the config.values.sh script, |
| 63 ;;; from configure, which was itself automatically generated from configure.in. | |
| 64 ;;; | |
| 543 | 65 ;;; See lisp/config.el for details on how this file is used. |
| 428 | 66 ;;; |
| 67 ;;; You are trapped in a twisty maze of strange-looking files, all autogenerated... | |
| 68 | |
| 69 ;;; configure is created, from configure.in, by autoconf | |
| 70 ;;; config.values.in is created, from configure, by config.values.sh | |
| 71 ;;; config.values is created, from config.values.in, by configure | |
| 543 | 72 ;;; config.values is read by lisp/config.el, |
| 428 | 73 ;;; to create the (Lisp object) config-value-hash-table |
| 74 | |
| 75 ;;; Variables defined in configure by AC_SUBST follow: | |
| 76 ;;; (These are used in Makefiles) | |
| 77 | |
| 434 | 78 "; |
| 428 | 79 |
| 434 | 80 my %done; |
| 81 for my $var (sort { $a cmp $b } | |
| 82 $configure_contents =~ | |
| 2651 | 83 /^s\,\@([A-Za-z0-9_]+)\@\,\$[A-Za-z0-9_]+\,;t t/mg) { |
| 434 | 84 $new_cvi_contents .= "$var \"\@$var\@\"\n" unless exists $done{$var}; |
| 85 $done{$var} = 1; | |
| 86 } | |
| 87 | |
| 88 $new_cvi_contents .= " | |
| 428 | 89 ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow: |
| 90 ;;; (These are used in C code) | |
| 91 | |
| 434 | 92 "; |
| 93 | |
| 94 if ($cvi_contents ne $new_cvi_contents) { | |
| 95 unlink "lib-src/config.values.in"; | |
| 96 open (CVI, "> lib-src/config.values.in") | |
| 97 or die "lib-src/config.values.in: $!"; | |
| 98 print CVI $new_cvi_contents; | |
| 99 close CVI | |
| 100 or die "lib-src/config.values.in: $!"; | |
| 101 } |
