Mercurial > emacs
annotate oldXMenu/insque.c @ 99492:ee792794d888
(isearch-search-fun): Compare the length of the
current search string with the length of the string from the
previous search state to detect the situation when the user
adds or removes characters in the search string.
Use word-search-forward-lax and word-search-backward-lax in this
case, and otherwise word-search-forward and word-search-backward.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Tue, 11 Nov 2008 19:43:09 +0000 |
parents | 3765d76f7fa8 |
children | a04b5f26a401 |
rev | line source |
---|---|
75059 | 1 /* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, |
79743 | 2 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
75059 | 3 |
94791
3765d76f7fa8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79743
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
75059 | 5 it under the terms of the GNU General Public License as published by |
94791
3765d76f7fa8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79743
diff
changeset
|
6 the Free Software Foundation, either version 3 of the License, or |
3765d76f7fa8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79743
diff
changeset
|
7 (at your option) any later version. |
75059 | 8 |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
94791
3765d76f7fa8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79743
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
65000
3861ff8f4bf1
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
52401
diff
changeset
|
16 |
25858 | 17 /* This file implements the emacs_insque and emacs_remque functions, |
75059 | 18 clones of the insque and remque functions of BSD. They and all |
25858 | 19 their callers have been renamed to emacs_mumble to allow us to |
20 include this file in the menu library on all systems. */ | |
21 | |
22 | |
23 struct qelem { | |
24 struct qelem *q_forw; | |
25 struct qelem *q_back; | |
26 char q_data[1]; | |
27 }; | |
28 | |
29 /* Insert ELEM into a doubly-linked list, after PREV. */ | |
30 | |
31 void | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
32 emacs_insque (elem, prev) |
25858 | 33 struct qelem *elem, *prev; |
34 { | |
35 struct qelem *next = prev->q_forw; | |
36 prev->q_forw = elem; | |
37 if (next) | |
38 next->q_back = elem; | |
39 elem->q_forw = next; | |
40 elem->q_back = prev; | |
41 } | |
42 | |
43 /* Unlink ELEM from the doubly-linked list that it is in. */ | |
44 | |
45 emacs_remque (elem) | |
46 struct qelem *elem; | |
47 { | |
48 struct qelem *next = elem->q_forw; | |
49 struct qelem *prev = elem->q_back; | |
50 if (next) | |
51 next->q_back = prev; | |
52 if (prev) | |
53 prev->q_forw = next; | |
54 } | |
52401 | 55 |
56 /* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165 | |
57 (do not change this comment) */ |