comparison lisp/custom/widget.el @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents b980b6286996
children 25f70ba0133c
comparison
equal deleted inserted replaced
148:f659db2a1f73 149:538048ae2ab8
2 ;; 2 ;;
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: help, extensions, faces, hypermedia 6 ;; Keywords: help, extensions, faces, hypermedia
7 ;; Version: 1.84 7 ;; Version: 1.97
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
9 26
10 ;;; Commentary: 27 ;;; Commentary:
11 ;; 28 ;;
12 ;; If you want to use this code, please visit the URL above. 29 ;; If you want to use this code, please visit the URL above.
13 ;; 30 ;;
25 (while keywords 42 (while keywords
26 (or (boundp (car keywords)) 43 (or (boundp (car keywords))
27 (set (car keywords) (car keywords))) 44 (set (car keywords) (car keywords)))
28 (setq keywords (cdr keywords))))))) 45 (setq keywords (cdr keywords)))))))
29 46
30 (define-widget-keywords :text-format :deactivate :active :inactive 47 (define-widget-keywords :mouse-down-action :glyph-up :glyph-down
31 :activate :sibling-args :delete-button-args 48 :glyph-inactive
49 :prompt-internal :prompt-history :prompt-match
50 :prompt-value :text-format :deactivate :active
51 :inactive :activate :sibling-args :delete-button-args
32 :insert-button-args :append-button-args :button-args 52 :insert-button-args :append-button-args :button-args
33 :tag-glyph :off-glyph :on-glyph :valid-regexp 53 :tag-glyph :off-glyph :on-glyph :valid-regexp
34 :secret :sample-face :sample-face-get :case-fold :widget-doc 54 :secret :sample-face :sample-face-get :case-fold :widget-doc
35 :create :convert-widget :format :value-create :offset :extra-offset 55 :create :convert-widget :format :value-create :offset :extra-offset
36 :tag :doc :from :to :args :value :value-from :value-to :action 56 :tag :doc :from :to :args :value :value-from :value-to :action
47 ;; These autoloads should be deleted when the file is added to Emacs. 67 ;; These autoloads should be deleted when the file is added to Emacs.
48 (unless (fboundp 'load-gc) 68 (unless (fboundp 'load-gc)
49 (autoload 'widget-apply "wid-edit") 69 (autoload 'widget-apply "wid-edit")
50 (autoload 'widget-create "wid-edit") 70 (autoload 'widget-create "wid-edit")
51 (autoload 'widget-insert "wid-edit") 71 (autoload 'widget-insert "wid-edit")
72 (autoload 'widget-prompt-value "wid-edit")
52 (autoload 'widget-browse "wid-browse" nil t) 73 (autoload 'widget-browse "wid-browse" nil t)
53 (autoload 'widget-browse-other-window "wid-browse" nil t) 74 (autoload 'widget-browse-other-window "wid-browse" nil t)
54 (autoload 'widget-browse-at "wid-browse" nil t)) 75 (autoload 'widget-browse-at "wid-browse" nil t)
76 (autoload 'widget-minor-mode "wid-browse" nil t))
55 77
56 (defun define-widget (name class doc &rest args) 78 (defun define-widget (name class doc &rest args)
57 "Define a new widget type named NAME from CLASS. 79 "Define a new widget type named NAME from CLASS.
58 80
59 NAME and CLASS should both be symbols, CLASS should be one of the 81 NAME and CLASS should both be symbols, CLASS should be one of the
66 88
67 * (apply 'widget-create CLASS ARGS) 89 * (apply 'widget-create CLASS ARGS)
68 90
69 The third argument DOC is a documentation string for the widget." 91 The third argument DOC is a documentation string for the widget."
70 (put name 'widget-type (cons class args)) 92 (put name 'widget-type (cons class args))
71 (put name 'widget-documentation doc)) 93 (put name 'widget-documentation doc)
94 name)
72 95
73 ;;; The End. 96 ;;; The End.
74 97
75 (provide 'widget) 98 (provide 'widget)
76 99