;; See `widget.el'.
;;; Code:
+(require 'cl-lib)
;;; Compatibility.
((or widget-menu-minibuffer-flag
(> (length items) widget-menu-max-shortcuts))
;; Read the choice of name from the minibuffer.
- (setq items (widget-remove-if 'stringp items))
+ (setq items (cl-remove-if 'stringp items))
(let ((val (completing-read (concat title ": ") items nil t)))
(if (stringp val)
(let ((try (try-completion val items)))
(error "Canceled"))
value))))
-(defun widget-remove-if (predicate list)
- (let (result (tail list))
- (while tail
- (or (funcall predicate (car tail))
- (setq result (cons (car tail) result)))
- (setq tail (cdr tail)))
- (nreverse result)))
-
;;; Widget text specifications.
;;
;; These functions are for specifying text properties.
(or (widget-get widget :value)
(progn
(when (widget-get widget :args)
+ (setq widget (widget-copy widget))
(let (args)
(dolist (arg (widget-get widget :args))
(setq args (append args