Mercurial > hg > xemacs-beta
annotate tests/gutter-test.el @ 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 |
---|---|
4781
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
1 ;;; Copyright (C) 1998 Andy Piper |
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
2 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
3 ;; This file is part of XEmacs. |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
4 ;; |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
5 ;; 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:
4781
diff
changeset
|
6 ;; 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:
4781
diff
changeset
|
7 ;; 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:
4781
diff
changeset
|
8 ;; option) any later version. |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
9 ;; |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
10 ;; 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:
4781
diff
changeset
|
11 ;; 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:
4781
diff
changeset
|
12 ;; 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:
4781
diff
changeset
|
13 ;; for more details. |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
14 ;; |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
15 ;; You should have received a copy of the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
16 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
4781
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
17 |
442 | 18 (setq str "Hello\nAgain") |
19 (setq str-ext (make-extent 0 5 str)) | |
398 | 20 (set-extent-begin-glyph |
442 | 21 str-ext |
398 | 22 (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) |
442 | 23 (set-extent-property str-ext 'mouse-face 'highlight) |
398 | 24 |
442 | 25 (setq str2 "Hello\n") |
26 (setq str2-ext (make-extent 0 1 str2)) | |
398 | 27 (set-extent-begin-glyph |
442 | 28 str2-ext |
398 | 29 (make-glyph |
30 [button :width 5 :height 1 | |
31 :face modeline-mousable | |
442 | 32 :callback (set-specifier bottom-gutter-visible-p '(str2)) |
398 | 33 :descriptor "ok" :selected t])) |
34 | |
442 | 35 (set-specifier bottom-gutter-height 'autodetect) |
36 (set-specifier bottom-gutter-border-width 2) | |
37 | |
38 (set-gutter-element | |
39 bottom-gutter 'str | |
40 (make-glyph | |
863 | 41 [layout :orientation vertical :margin-width 4 |
42 :vertically-justify center :horizontally-justify left | |
442 | 43 :items ([string :data "Fontifying glyphs.c..."] |
863 | 44 [layout :orientation horizontal |
442 | 45 :items |
46 ([progress-gauge :value 0 :pixel-height 24 | |
47 :pixel-width 250 :descriptor | |
48 "Progress"] | |
49 [button :pixel-height 24 | |
50 :descriptor " Stop " | |
51 :callback (quote quit)])])])) | |
52 | |
53 (set-gutter-element-visible-p bottom-gutter-visible-p 'str t) | |
863 | 54 (set-gutter-element left-gutter 'str2 str2) |
55 (set-gutter-element-visible-p left-gutter-visible-p 'str2 t) | |
442 | 56 |