Mercurial > hg > xemacs-beta
comparison src/widget.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | a2f645c6b9f8 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
27 for the sole reason of efficiency. */ | 27 for the sole reason of efficiency. */ |
28 | 28 |
29 #include <config.h> | 29 #include <config.h> |
30 #include "lisp.h" | 30 #include "lisp.h" |
31 #include "buffer.h" | 31 #include "buffer.h" |
32 #include "insdel.h" | |
33 | 32 |
34 | 33 |
35 Lisp_Object Qwidget_type; | 34 Lisp_Object Qwidget_type; |
36 | 35 |
37 | 36 |
50 return plist; | 49 return plist; |
51 } | 50 } |
52 | 51 |
53 DEFUN ("widget-put", Fwidget_put, 3, 3, 0, /* | 52 DEFUN ("widget-put", Fwidget_put, 3, 3, 0, /* |
54 In WIDGET set PROPERTY to VALUE. | 53 In WIDGET set PROPERTY to VALUE. |
55 The value can later be retrived with `widget-get'. | 54 The value can later be retrieved with `widget-get'. |
56 */ | 55 */ |
57 (widget, property, value)) | 56 (widget, property, value)) |
58 { | 57 { |
59 CHECK_CONS (widget); | 58 CHECK_CONS (widget); |
60 XCDR (widget) = Fplist_put (XCDR (widget), property, value); | 59 XCDR (widget) = Fplist_put (XCDR (widget), property, value); |
66 The value could either be specified when the widget was created, or | 65 The value could either be specified when the widget was created, or |
67 later with `widget-put'. | 66 later with `widget-put'. |
68 */ | 67 */ |
69 (widget, property)) | 68 (widget, property)) |
70 { | 69 { |
71 Lisp_Object tmp, value; | 70 Lisp_Object value = Qnil; |
72 | 71 |
73 value = Qnil; | |
74 while (1) | 72 while (1) |
75 { | 73 { |
76 tmp = Fwidget_plist_member (Fcdr (widget), property); | 74 Lisp_Object tmp = Fwidget_plist_member (Fcdr (widget), property); |
77 if (!NILP (tmp)) | 75 if (!NILP (tmp)) |
78 { | 76 { |
79 value = Fcar (Fcdr (tmp)); | 77 value = Fcar (Fcdr (tmp)); |
80 break; | 78 break; |
81 } | 79 } |