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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
18 (setq str "Hello\nAgain")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
19 (setq str-ext (make-extent 0 5 str))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
20 (set-extent-begin-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
21 str-ext
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
22 (make-glyph [xpm :file "../etc/xemacs-icon.xpm"]))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
23 (set-extent-property str-ext 'mouse-face 'highlight)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
24
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
25 (setq str2 "Hello\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
26 (setq str2-ext (make-extent 0 1 str2))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
27 (set-extent-begin-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
28 str2-ext
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
29 (make-glyph
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
30 [button :width 5 :height 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
31 :face modeline-mousable
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
32 :callback (set-specifier bottom-gutter-visible-p '(str2))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33 :descriptor "ok" :selected t]))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
35 (set-specifier bottom-gutter-height 'autodetect)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
36 (set-specifier bottom-gutter-border-width 2)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
37
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
38 (set-gutter-element
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
39 bottom-gutter 'str
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
40 (make-glyph
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
41 [layout :orientation vertical :margin-width 4
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
42 :vertically-justify center :horizontally-justify left
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
43 :items ([string :data "Fontifying glyphs.c..."]
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
44 [layout :orientation horizontal
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
45 :items
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
46 ([progress-gauge :value 0 :pixel-height 24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
47 :pixel-width 250 :descriptor
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
48 "Progress"]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
49 [button :pixel-height 24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
50 :descriptor " Stop "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
51 :callback (quote quit)])])]))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
52
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
53 (set-gutter-element-visible-p bottom-gutter-visible-p 'str t)
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
54 (set-gutter-element left-gutter 'str2 str2)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
55 (set-gutter-element-visible-p left-gutter-visible-p 'str2 t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
56