gnats-diffs
[Top][All Lists]
Advanced

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

Changes to gnats/gnats/gnats.el


From: Milan Zamazal
Subject: Changes to gnats/gnats/gnats.el
Date: Sun, 03 Mar 2002 15:15:03 -0500

Index: gnats/gnats/gnats.el
diff -c gnats/gnats/gnats.el:1.29 gnats/gnats/gnats.el:1.30
*** gnats/gnats/gnats.el:1.29   Sun Feb 10 13:26:07 2002
--- gnats/gnats/gnats.el        Sun Mar  3 15:15:03 2002
***************
*** 185,199 ****
    "Undo, but disabling motion-hooks and read-only attributes.
  Do the undo COUNT times."
    (interactive "P")
!   (let ((old-inhibit-read-only inhibit-read-only)
!       (old-motion-hooks inhibit-point-motion-hooks))
!     (unwind-protect
!       (progn
!         (setq inhibit-point-motion-hooks t)
!         (setq inhibit-read-only t)
!         (advertised-undo count))
!       (setq inhibit-point-motion-hooks old-motion-hooks)
!       (setq inhibit-read-only old-inhibit-read-only))))
  
  (defun gnats-mark-field-edited (field)
    "Mark FIELD as having been edited.
--- 185,193 ----
    "Undo, but disabling motion-hooks and read-only attributes.
  Do the undo COUNT times."
    (interactive "P")
!   (let ((inhibit-read-only t)
!       (inhibit-point-motion-hooks t))
!     (advertised-undo count)))
  
  (defun gnats-mark-field-edited (field)
    "Mark FIELD as having been edited.
***************
*** 229,251 ****
    "Replace FIELD's text in the edit buffer with NEW-TEXT."
    (let* ((curr-point (point))
         (start (gnats-find-field-start field curr-point))
!        (end (next-single-property-change curr-point 'gnats-field-name)))
!     (let ((old-inhibit-read-only inhibit-read-only)
!         (old-motion-hooks inhibit-point-motion-hooks))
!       (unwind-protect
!         (progn
!           (setq inhibit-read-only t)
!           (setq inhibit-point-motion-hooks t)
!           (delete-region start end)
!           ;; Make the undo atomic.
!           (if (and (listp buffer-undo-list) (null (car buffer-undo-list)))
!               (setq buffer-undo-list (cdr buffer-undo-list)))
!           (goto-char start)
!           (gnats-insert-text field new-text t
!                              (list 'read-only t 'mouse-face 'highlight
!                                    'local-map gnats-edit-button-map)))
!       (setq inhibit-read-only old-inhibit-read-only)
!       (setq inhibit-point-motion-hooks old-motion-hooks)))))
  
  (defun gnats-delete-field (field)
    "Remove FIELD entirely from the PR.
--- 223,239 ----
    "Replace FIELD's text in the edit buffer with NEW-TEXT."
    (let* ((curr-point (point))
         (start (gnats-find-field-start field curr-point))
!        (end (next-single-property-change curr-point 'gnats-field-name))
!        (inhibit-read-only t)
!        (inhibit-point-motion-hooks t))
!     (delete-region start end)
!     ;; Make the undo atomic.
!     (if (and (listp buffer-undo-list) (null (car buffer-undo-list)))
!       (setq buffer-undo-list (cdr buffer-undo-list)))
!     (goto-char start)
!     (gnats-insert-text field new-text t
!                      (list 'read-only t 'mouse-face 'highlight
!                            'local-map gnats-edit-button-map))))
  
  (defun gnats-delete-field (field)
    "Remove FIELD entirely from the PR.



reply via email to

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