aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2016-05-23 19:57:46 -0400
committerStefan Monnier2016-05-23 19:57:46 -0400
commit41214582455a6ad08098df14a5febd769622aab4 (patch)
tree4d85da6d9006f61031c75966ac867a52931d9fcc
parent5e17f509116e88998be5ac664907aa80ea39710a (diff)
downloademacs-41214582455a6ad08098df14a5febd769622aab4.tar.gz
emacs-41214582455a6ad08098df14a5febd769622aab4.zip
* lisp/widget.el (define-widget): Use `declare' (which does work now).
(widget-plist-member): Mark as obsolete.
-rw-r--r--lisp/widget.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/widget.el b/lisp/widget.el
index 2db645ab08d..1574fb265c6 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -68,7 +68,6 @@
68;; :button-face-get :button-face :value-face :keymap :entry-from 68;; :button-face-get :button-face :value-face :keymap :entry-from
69;; :entry-to :help-echo :documentation-property :tab-order) 69;; :entry-to :help-echo :documentation-property :tab-order)
70 70
71(put 'define-widget 'doc-string-elt 3) ;`declare' doesn't work in functions.
72(defun define-widget (name class doc &rest args) 71(defun define-widget (name class doc &rest args)
73 "Define a new widget type named NAME from CLASS. 72 "Define a new widget type named NAME from CLASS.
74 73
@@ -80,9 +79,10 @@ create identical widgets:
80 79
81* (widget-create NAME) 80* (widget-create NAME)
82 81
83* (apply \\='widget-create CLASS ARGS) 82* (apply #\\='widget-create CLASS ARGS)
84 83
85The third argument DOC is a documentation string for the widget." 84The third argument DOC is a documentation string for the widget."
85 (declare (doc-string 3))
86 ;; 86 ;;
87 (unless (or (null doc) (stringp doc)) 87 (unless (or (null doc) (stringp doc))
88 (error "widget documentation must be nil or a string.")) 88 (error "widget documentation must be nil or a string."))
@@ -91,7 +91,7 @@ The third argument DOC is a documentation string for the widget."
91 name) 91 name)
92 92
93;; This is used by external widget code (in W3, at least). 93;; This is used by external widget code (in W3, at least).
94(defalias 'widget-plist-member 'plist-member) 94(define-obsolete-function-alias 'widget-plist-member #'plist-member "26.1")
95 95
96;;; The End. 96;;; The End.
97 97