comparison lisp/custom/wid-edit.el @ 44:8d2a9b52c682 r19-15prefinal

Import from CVS: tag r19-15prefinal
author cvs
date Mon, 13 Aug 2007 08:55:10 +0200
parents c53a95d3c46d
children
comparison
equal deleted inserted replaced
43:23cafc5d2038 44:8d2a9b52c682
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: extensions 6 ;; Keywords: extensions
7 ;; Version: 1.65 7 ;; Version: 1.67
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
9 9
10 ;;; Commentary: 10 ;;; Commentary:
11 ;; 11 ;;
12 ;; See `widget.el'. 12 ;; See `widget.el'.
1075 (let ((from (widget-get widget :from)) 1075 (let ((from (widget-get widget :from))
1076 (to (widget-get widget :to)) 1076 (to (widget-get widget :to))
1077 (inhibit-read-only t) 1077 (inhibit-read-only t)
1078 after-change-functions) 1078 after-change-functions)
1079 (widget-apply widget :value-delete) 1079 (widget-apply widget :value-delete)
1080 (delete-region from to) 1080 (when (< from to)
1081 ;; Kludge: this doesn't need to be true for empty formats.
1082 (delete-region from to))
1081 (set-marker from nil) 1083 (set-marker from nil)
1082 (set-marker to nil))) 1084 (set-marker to nil)))
1083 1085
1084 (defun widget-default-value-set (widget value) 1086 (defun widget-default-value-set (widget value)
1085 ;; Recreate widget with new value. 1087 ;; Recreate widget with new value.
1965 (widget-put widget :children (cons child children)) 1967 (widget-put widget :children (cons child children))
1966 (while (not (eq (car (cdr children)) before)) 1968 (while (not (eq (car (cdr children)) before))
1967 (setq children (cdr children))) 1969 (setq children (cdr children)))
1968 (setcdr children (cons child (cdr children))))))) 1970 (setcdr children (cons child (cdr children)))))))
1969 (widget-setup) 1971 (widget-setup)
1970 (widget-apply widget :notify widget)) 1972 widget (widget-apply widget :notify widget))
1971 1973
1972 (defun widget-editable-list-delete-at (widget child) 1974 (defun widget-editable-list-delete-at (widget child)
1973 ;; Delete child from list of children. 1975 ;; Delete child from list of children.
1974 (save-excursion 1976 (save-excursion
1975 (let ((buttons (copy-list (widget-get widget :buttons))) 1977 (let ((buttons (copy-list (widget-get widget :buttons)))