Mercurial > hg > xemacs-beta
annotate src/dump-data.c @ 5855:0bddb59072b6
Look for cased character classes when deciding on case-fold-search, #'isearch
lisp/ChangeLog addition:
2015-03-11 Aidan Kehoe <kehoea@parhasard.net>
* isearch-mode.el:
* isearch-mode.el (isearch-fix-case):
Use the new #'no-case-regexp-p function if treating ISEARCH-STRING
as a regular expression; otherwise, use the [[:upper:]] character
class.
* isearch-mode.el (isearch-no-upper-case-p): Removed.
* isearch-mode.el (with-caps-disable-folding): Removed.
These two haven't been used since 1998.
* occur.el (occur-1):
Use #'no-case-regexp-p here.
* replace.el (perform-replace):
Don't use #'no-upper-case-p, use #'no-case-regexp-p or
(string-match "[[:upper:]]" ...) as appropriate.
* simple.el:
* simple.el (no-upper-case-p): Removed. This did two different
things, and its secondary function (examining regular expressions)
just became much more complicated; move the regular expression
functionality to its own function, use character classes when
examining non-regular-expressions instead.
The code to look for character classes, and the design decision
that this should be done, are from GNU, thank you Stefan Monnier.
* simple.el (no-case-regexp-p): New.
Given a REGEXP, return non-nil if it has nothing to suggest an
interactive user wants a case-sensitive search.
* simple.el (with-search-caps-disable-folding):
* simple.el (with-interactive-search-caps-disable-folding):
Update both these macros to use #'no-case-regexp-p.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 11 Mar 2015 18:06:15 +0000 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
2015 | 1 /* Static array to put the dumped data in and its management |
2 Copyright (C) 2003 Olivier Galibert | |
3 | |
4 This file is part of XEmacs. | |
5 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
6 XEmacs is free software: you can redistribute it and/or modify it |
2015 | 7 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
8 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:
2367
diff
changeset
|
9 option) any later version. |
2015 | 10 |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 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:
2367
diff
changeset
|
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
2015 | 18 |
19 /* Synched up with: Not in FSF. */ | |
20 | |
21 /* Mule-ized? Mwahahahahahaha */ | |
22 | |
23 /* Magic values by Larry McVoy to prevent every known compiler, including | |
24 an especially perverse HP-UX one, from putting the array in BSS. | |
25 */ | |
26 | |
27 | |
28 #include <config.h> | |
29 #include "lisp.h" | |
30 #include "dump-data.h" | |
31 | |
32 /* 4 bytes for the data size, 4096 for alignment */ | |
33 | |
2367 | 34 static Rawbyte dumped_data[MAX_SIZE+4096+4] = { |
2015 | 35 255, |
36 6, | |
37 1, | |
38 2, | |
39 3, | |
40 4, | |
41 255, | |
42 3, | |
43 9, | |
44 62, | |
45 255, | |
46 10, | |
47 4, | |
48 61, | |
49 255 | |
50 }; | |
51 | |
52 size_t | |
2367 | 53 dumped_data_size (void) |
2015 | 54 { |
2367 | 55 return dumped_data[0] | (dumped_data[1] << 8) | (dumped_data[2] << 16) | |
56 (dumped_data[3] << 24); | |
2015 | 57 } |
58 | |
59 size_t | |
2367 | 60 dumped_data_max_size (void) |
2015 | 61 { |
62 return MAX_SIZE; | |
63 } | |
64 | |
65 size_t | |
2367 | 66 dumped_data_align_offset (void) |
2015 | 67 { |
2367 | 68 EMACS_INT iptr = (EMACS_INT) dumped_data; |
2015 | 69 EMACS_INT iptr2; |
2367 | 70 iptr2 = (iptr + 4 + 4095) & ~(EMACS_INT) 4095; |
2015 | 71 |
2367 | 72 return iptr2 - iptr; |
2015 | 73 } |
74 | |
2367 | 75 Rawbyte * |
76 dumped_data_get (void) | |
2015 | 77 { |
2367 | 78 EMACS_INT iptr = (EMACS_INT) dumped_data; |
79 iptr = (iptr + 4 + 4095) & ~(EMACS_INT) 4095; | |
80 return (Rawbyte *) iptr; | |
2015 | 81 } |
82 |