emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/wid-edit.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/wid-edit.el
Date: Sat, 31 May 2003 11:33:09 -0400

Index: emacs/lisp/wid-edit.el
diff -c emacs/lisp/wid-edit.el:1.118 emacs/lisp/wid-edit.el:1.119
*** emacs/lisp/wid-edit.el:1.118        Sat May 17 16:29:40 2003
--- emacs/lisp/wid-edit.el      Sat May 31 11:33:09 2003
***************
*** 1,6 ****
  ;;; wid-edit.el --- Functions for creating and using widgets 
-*-byte-compile-dynamic: t;-*-
  ;;
! ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 Free Software 
Foundation, Inc.
  ;;
  ;; Author: Per Abrahamsen <address@hidden>
  ;; Maintainer: FSF
--- 1,6 ----
  ;;; wid-edit.el --- Functions for creating and using widgets 
-*-byte-compile-dynamic: t;-*-
  ;;
! ;; Copyright (C) 1996,97,1999,2000,01,02,2003  Free Software Foundation, Inc.
  ;;
  ;; Author: Per Abrahamsen <address@hidden>
  ;; Maintainer: FSF
***************
*** 414,429 ****
    "Execute FORM without inheriting any text properties."
    `(save-restriction
      (let ((inhibit-read-only t)
!         (inhibit-modification-hooks t)
!         result)
!       (insert "<>")
!       (narrow-to-region (- (point) 2) (point))
!       (goto-char (1+ (point-min)))
!       (setq result (progn ,@form))
!       (delete-region (point-min) (1+ (point-min)))
!       (delete-region (1- (point-max)) (point-max))
!       (goto-char (point-max))
!       result)))
  
  (defface widget-inactive-face '((((class grayscale color)
                                  (background dark))
--- 414,423 ----
    "Execute FORM without inheriting any text properties."
    `(save-restriction
      (let ((inhibit-read-only t)
!         (inhibit-modification-hooks t))
!       (narrow-to-region (point) (point))
!       (prog1 (progn ,@form)
!       (goto-char (point-max))))))
  
  (defface widget-inactive-face '((((class grayscale color)
                                  (background dark))
***************
*** 565,571 ****
  respectively."
    (let ((cur (point-min))
        (widget nil)
-       (parent nil)
        (overlays (if buffer
                      (with-current-buffer buffer (overlay-lists))
                    (overlay-lists))))
--- 559,564 ----
***************
*** 1001,1008 ****
    (or (bobp) (> arg 0) (backward-char))
    (let ((wrapped 0)
        (number arg)
!       (old (widget-tabable-at))
!       new)
      ;; Forward.
      (while (> arg 0)
        (cond ((eobp)
--- 994,1000 ----
    (or (bobp) (> arg 0) (backward-char))
    (let ((wrapped 0)
        (number arg)
!       (old (widget-tabable-at)))
      ;; Forward.
      (while (> arg 0)
        (cond ((eobp)
***************
*** 2483,2489 ****
  
  (defun widget-editable-list-format-handler (widget escape)
    ;; We recognize the insert button.
! ;;;   (let ((widget-push-button-gui widget-editable-list-gui))
      (cond ((eq escape ?i)
           (and (widget-get widget :indent)
                (insert-char ?\  (widget-get widget :indent)))
--- 2475,2481 ----
  
  (defun widget-editable-list-format-handler (widget escape)
    ;; We recognize the insert button.
!     ;; (let ((widget-push-button-gui widget-editable-list-gui))
      (cond ((eq escape ?i)
           (and (widget-get widget :indent)
                (insert-char ?\  (widget-get widget :indent)))
***************
*** 2492,2498 ****
                  (widget-get widget :append-button-args)))
          (t
           (widget-default-format-handler widget escape)))
! ;;;     )
    )
  
  (defun widget-editable-list-value-create (widget)
--- 2484,2490 ----
                  (widget-get widget :append-button-args)))
          (t
           (widget-default-format-handler widget escape)))
!     ;; )
    )
  
  (defun widget-editable-list-value-create (widget)
***************
*** 2593,2599 ****
  (defun widget-editable-list-entry-create (widget value conv)
    ;; Create a new entry to the list.
    (let ((type (nth 0 (widget-get widget :args)))
! ;;;   (widget-push-button-gui widget-editable-list-gui)
        child delete insert)
      (widget-specify-insert
       (save-excursion
--- 2585,2591 ----
  (defun widget-editable-list-entry-create (widget value conv)
    ;; Create a new entry to the list.
    (let ((type (nth 0 (widget-get widget :args)))
!       ;; (widget-push-button-gui widget-editable-list-gui)
        child delete insert)
      (widget-specify-insert
       (save-excursion
***************
*** 2622,2639 ****
                               widget type (widget-default-get type)))))
               (t
                (error "Unknown escape `%c'" escape)))))
!      (widget-put widget
!                :buttons (cons delete
!                               (cons insert
!                                     (widget-get widget :buttons))))
       (let ((entry-from (point-min-marker))
           (entry-to (point-max-marker)))
         (set-marker-insertion-type entry-from t)
         (set-marker-insertion-type entry-to nil)
         (widget-put child :entry-from entry-from)
         (widget-put child :entry-to entry-to)))
!     (widget-put insert :widget child)
!     (widget-put delete :widget child)
      child))
  
  ;;; The `group' Widget.
--- 2614,2631 ----
                               widget type (widget-default-get type)))))
               (t
                (error "Unknown escape `%c'" escape)))))
!      (let ((buttons (widget-get widget :buttons)))
!        (if insert (push insert buttons))
!        (if delete (push delete buttons))
!        (widget-put widget :buttons buttons))
       (let ((entry-from (point-min-marker))
           (entry-to (point-max-marker)))
         (set-marker-insertion-type entry-from t)
         (set-marker-insertion-type entry-to nil)
         (widget-put child :entry-from entry-from)
         (widget-put child :entry-to entry-to)))
!     (if insert (widget-put insert :widget child))
!     (if delete (widget-put delete :widget child))
      child))
  
  ;;; The `group' Widget.
***************
*** 3250,3256 ****
    :value-to-internal (lambda (widget value)
                       (list (car value) (cdr value)))
    :value-to-external (lambda (widget value)
!                      (cons (nth 0 value) (nth 1 value))))
  
  (defun widget-cons-match (widget value)
    (and (consp value)
--- 3242,3248 ----
    :value-to-internal (lambda (widget value)
                       (list (car value) (cdr value)))
    :value-to-external (lambda (widget value)
!                      (apply 'cons value)))
  
  (defun widget-cons-match (widget value)
    (and (consp value)
***************
*** 3473,3484 ****
         (prompt (concat tag ": "))
         (value (widget-value widget))
         (start (widget-field-start widget))
-        (pos (cond ((< (point) start)
-                    0)
-                   ((> (point) (+ start (length value)))
-                    (length value))
-                   (t
-                    (- (point) start))))
         (answer (facemenu-read-color prompt)))
      (unless (zerop (length answer))
        (widget-value-set widget answer)
--- 3465,3470 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]