Mercurial > hg > xemacs-beta
annotate lisp/iso8859-1.el @ 5170:5ddbab03b0e6
various fixes to memory-usage stats
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-03-25 Ben Wing <ben@xemacs.org>
* diagnose.el (show-memory-usage):
* diagnose.el (show-object-memory-usage-stats):
Further changes to correspond with changes in the C code;
add an additional column in show-object-memory-usage-stats showing
the ancillary Lisp overhead used with each type; shrink columns for
windows in show-memory-usage to get it to fit in 79 chars.
src/ChangeLog addition:
2010-03-25 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (struct):
* alloc.c (finish_object_memory_usage_stats):
* alloc.c (object_memory_usage_stats):
* alloc.c (Fobject_memory_usage):
* alloc.c (lisp_object_memory_usage_full):
* alloc.c (compute_memusage_stats_length):
* lrecord.h:
* lrecord.h (struct lrecord_implementation):
Add fields to the `lrecord_implementation' structure to list an
offset into the array of extra statistics in a
`struct generic_usage_stats' and a length, listing the first slice
of ancillary Lisp-object memory. Compute automatically in
compute_memusage_stats_length(). Use to add an entry
`FOO-lisp-ancillary-storage' for object type FOO.
Don't crash when an int or char is given to object-memory-usage,
signal an error instead.
Add functions lisp_object_memory_usage_full() and
lisp_object_memory_usage() to compute the total memory usage of an
object (sum of object, non-Lisp attached, and Lisp ancillary
memory).
* array.c:
* array.c (gap_array_memory_usage):
* array.h:
Add function to return memory usage of a gap array.
* buffer.c (struct buffer_stats):
* buffer.c (compute_buffer_usage):
* buffer.c (vars_of_buffer):
* extents.c (compute_buffer_extent_usage):
* marker.c:
* marker.c (compute_buffer_marker_usage):
* extents.h:
* lisp.h:
Remove `struct usage_stats' arg from compute_buffer_marker_usage()
and compute_buffer_extent_usage() -- these are ancillary Lisp
objects and don't get accumulated into `struct usage_stats';
change the value of `memusage_stats_list' so that `markers' and
`extents' memory is in Lisp-ancillary, where it belongs.
In compute_buffer_marker_usage(), use lisp_object_memory_usage()
rather than lisp_object_storage_size().
* casetab.c:
* casetab.c (case_table_memory_usage):
* casetab.c (vars_of_casetab):
* emacs.c (main_1):
Add memory usage stats for case tables.
* lisp.h:
Add comment explaining the `struct generic_usage_stats' more,
as well as the new fields in lrecord_implementation.
* console-impl.h:
* console-impl.h (struct console_methods):
* scrollbar-gtk.c:
* scrollbar-gtk.c (gtk_compute_scrollbar_instance_usage):
* scrollbar-msw.c:
* scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage):
* scrollbar-x.c:
* scrollbar-x.c (x_compute_scrollbar_instance_usage):
* scrollbar.c:
* scrollbar.c (struct scrollbar_instance_stats):
* scrollbar.c (compute_all_scrollbar_instance_usage):
* scrollbar.c (scrollbar_instance_memory_usage):
* scrollbar.c (scrollbar_objects_create):
* scrollbar.c (vars_of_scrollbar):
* scrollbar.h:
* symsinit.h:
* window.c:
* window.c (find_window_mirror_maybe):
* window.c (struct window_mirror_stats):
* window.c (compute_window_mirror_usage):
* window.c (window_mirror_memory_usage):
* window.c (compute_window_usage):
* window.c (window_objects_create):
* window.c (syms_of_window):
* window.c (vars_of_window):
Redo memory-usage associated with windows, window mirrors, and
scrollbar instances. Should fix crash in find_window_mirror,
among other things. Properly assign memo ry to object memory,
non-Lisp extra memory, and Lisp ancillary memory. For example,
redisplay structures are non-Lisp memory hanging off a window
mirror, not a window; make it an ancillary Lisp-object field.
Window mirrors and scrollbar instances have their own statistics,
among other things.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 25 Mar 2010 06:07:25 -0500 |
parents | 0cee1ff42db4 |
children | 57a64ab2ae45 308d34e9f07d |
rev | line source |
---|---|
4103 | 1 ;;; iso8859-1.el --- Set case table for Latin 1 |
428 | 2 |
3540 | 3 ;; Copyright (C) 1992, 1997, 2006 Free Software Foundation, Inc. |
428 | 4 |
5 ;; Author: Jamie Zawinski <jwz@jwz.org> | |
6 ;; Created: 19-aug-92 | |
7 ;; Maintainer: XEmacs Development Team | |
8 ;; Keywords: internal, dumped | |
9 | |
10 ;; This file is part of XEmacs. | |
11 | |
12 ;; XEmacs is free software; you can redistribute it and/or modify it | |
13 ;; under the terms of the GNU General Public License as published by | |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
17 ;; XEmacs is distributed in the hope that it will be useful, but | |
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 ;; General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
25 ;; 02111-1307, USA. | |
26 | |
3540 | 27 ;;; Synched up with: Not in FSF. |
428 | 28 |
29 ;;; Commentary: | |
30 | |
3540 | 31 ;; Sets the case table for the ISO-8859/1 character set. |
4369
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
32 ;; Provides ascii-case-table, for use in environments where multilingual |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
33 ;; case-insensitive processing is inappropriate. |
428 | 34 |
35 ;;; Code: | |
36 | |
4369
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
37 (defvar ascii-case-table |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
38 (loop |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
39 for lower from (char-int ?a) to (char-int ?z) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
40 and upper from (char-int ?A) to (char-int ?Z) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
41 with table = (make-case-table) |
4417
0cee1ff42db4
Correct the initialisation of ascii-case-table.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4371
diff
changeset
|
42 do (put-case-table-pair (coerce upper 'character) |
0cee1ff42db4
Correct the initialisation of ascii-case-table.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4371
diff
changeset
|
43 (coerce lower 'character) |
4369
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
44 table) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
45 finally return table) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
46 "Case table for the ASCII character set.") |
428 | 47 |
4369
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
48 (loop |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
49 for (upper lower) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
50 in '((?\xC0 ?\xE0) ;; A WITH GRAVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
51 (?\xC1 ?\xE1) ;; A WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
52 (?\xC2 ?\xE2) ;; A WITH CIRCUMFLEX |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
53 (?\xC3 ?\xE3) ;; A WITH TILDE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
54 (?\xC4 ?\xE4) ;; A WITH DIAERESIS |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
55 (?\xC5 ?\xE5) ;; A WITH RING ABOVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
56 (?\xC6 ?\xE6) ;; AE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
57 (?\xC7 ?\xE7) ;; C WITH CEDILLA |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
58 (?\xC8 ?\xE8) ;; E WITH GRAVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
59 (?\xC9 ?\xE9) ;; E WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
60 (?\xCA ?\xEA) ;; E WITH CIRCUMFLEX |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
61 (?\xCB ?\xEB) ;; E WITH DIAERESIS |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
62 (?\xCC ?\xEC) ;; I WITH GRAVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
63 (?\xCD ?\xED) ;; I WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
64 (?\xCE ?\xEE) ;; I WITH CIRCUMFLEX |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
65 (?\xCF ?\xEF) ;; I WITH DIAERESIS |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
66 (?\xD0 ?\xF0) ;; ETH |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
67 (?\xD1 ?\xF1) ;; N WITH TILDE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
68 (?\xD2 ?\xF2) ;; O WITH GRAVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
69 (?\xD3 ?\xF3) ;; O WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
70 (?\xD4 ?\xF4) ;; O WITH CIRCUMFLEX |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
71 (?\xD5 ?\xF5) ;; O WITH TILDE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
72 (?\xD6 ?\xF6) ;; O WITH DIAERESIS |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
73 (?\xD8 ?\xF8) ;; O WITH STROKE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
74 (?\xD9 ?\xF9) ;; U WITH GRAVE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
75 (?\xDA ?\xFA) ;; U WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
76 (?\xDB ?\xFB) ;; U WITH CIRCUMFLEX |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
77 (?\xDC ?\xFC) ;; U WITH DIAERESIS |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
78 (?\xDD ?\xFD) ;; Y WITH ACUTE |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
79 (?\xDE ?\xFE)) ;; THORN |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
80 with case-table = (standard-case-table) |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
81 do (put-case-table-pair upper lower case-table)) |
428 | 82 |
4369
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
83 ;; Everything Latin-1 and above should be displayed as its character value |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
84 ;; by default. |
ef9eb714f0e4
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
85 (setq-default ctl-arrow #xA0) |
428 | 86 |
4371
9fdac4a4ae62
Provide 'iso8859-1 again; one file (iso-syntax.el) uses it in the packages.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4369
diff
changeset
|
87 ;; Shouldn't be necessary, but one file in the packages uses it: |
9fdac4a4ae62
Provide 'iso8859-1 again; one file (iso-syntax.el) uses it in the packages.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4369
diff
changeset
|
88 (provide 'iso8859-1) |
9fdac4a4ae62
Provide 'iso8859-1 again; one file (iso-syntax.el) uses it in the packages.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4369
diff
changeset
|
89 |
428 | 90 ;;; iso8859-1.el ends here |