Mercurial > emacs
annotate oldXMenu/DelSel.c @ 109757:818e325e0469
Introduce a new comment style "c" flag.
* src/syntax.c (SYNTAX_FLAGS_COMMENT_STYLEB)
(SYNTAX_FLAGS_COMMENT_STYLEC): New macros.
(SYNTAX_FLAGS_COMMENT_STYLE): Use them, add an argument.
(syntax_prefix_flag_p): New function.
(Fstring_to_syntax): Understand new "c" flag.
(Finternal_describe_syntax_value): Recognize new flag; use the
SYNTAX_FLAGS_* macros.
(scan_sexps_forward, Fparse_partial_sexp): Change representation of
comment style to accomodate the new styles.
(back_comment, forw_comment, Fforward_comment, scan_lists)
(scan_sexps_forward): Update code to obey the new comment style flag.
* src/syntax.h: Move SYNTAX_FLAGS_FOO() macros to syntax.c.
* src/casefiddle.c (casify_region): Use the new syntax_prefix_flag_p.
* lisp/progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c"
comment style.
* lisp/progmodes/scheme.el (scheme-mode-syntax-table):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-syntax-table): Remove spurious
"b" flag in "14b" syntax.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 12 Aug 2010 16:44:16 +0200 |
parents | 5cc91198ffb2 |
children | ef719132ddfa |
rev | line source |
---|---|
76174
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
1 /* Copyright Massachusetts Institute of Technology 1985 */ |
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
2 |
25858 | 3 #include "copyright.h" |
4 | |
5 | |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuDeleteSelection - Deletes a selection from an XMenu object. | |
10 * | |
11 * Author: Tony Della Fera, DEC | |
12 * 20-Nov-85 | |
13 * | |
14 */ | |
15 | |
16 #include "XMenuInt.h" | |
17 | |
18 int | |
109124
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
19 XMenuDeleteSelection(register Display *display, register XMenu *menu, register int p_num, register int s_num) |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
20 /* Previously opened display. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
21 /* Menu object to be modified. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
22 /* Pane number to be deleted. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
23 /* Selection number to be deleted. */ |
25858 | 24 { |
25 register XMPane *p_ptr; /* Pointer to pane being deleted. */ | |
26 register XMSelect *s_ptr; /* Pointer to selections being deleted. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
27 |
25858 | 28 /* |
29 * Find the right pane. | |
30 */ | |
31 p_ptr = _XMGetPanePtr(menu, p_num); | |
32 if (p_ptr == NULL) return(XM_FAILURE); | |
33 | |
34 /* | |
35 * Find the right selection. | |
36 */ | |
37 s_ptr = _XMGetSelectionPtr(p_ptr, s_num); | |
38 if (s_ptr == NULL) return(XM_FAILURE); | |
39 | |
40 /* | |
41 * Remove the selection from the association table. | |
42 */ | |
43 XDeleteAssoc(display, menu->assoc_tab, s_ptr->window); | |
44 | |
45 /* | |
46 * Remove the selection from the parent pane's selection | |
47 * list and update the selection count. | |
48 */ | |
49 emacs_remque(s_ptr); | |
50 p_ptr->s_count--; | |
51 | |
52 /* | |
53 * Destroy the selection transparency. | |
54 */ | |
55 if (s_ptr->window) XDestroyWindow(display, s_ptr->window); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
56 |
25858 | 57 /* |
58 * Free the selection's XMSelect structure. | |
59 */ | |
60 free(s_ptr); | |
61 | |
62 /* | |
63 * Schedule a recompute. | |
64 */ | |
65 menu->recompute = 1; | |
66 | |
67 /* | |
68 * Return the selection number just deleted. | |
69 */ | |
70 _XMErrorCode = XME_NO_ERROR; | |
71 return(s_num); | |
72 } | |
52401 | 73 |
74 /* arch-tag: 24ca2bc7-8a37-471a-8095-e6363fc1ed10 | |
75 (do not change this comment) */ |