/[gnats]/gnats/gnats/gnats.el
ViewVC logotype

Diff of /gnats/gnats/gnats.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by pdm, Sun Feb 10 18:26:07 2002 UTC revision 1.30 by pdm, Sun Mar 3 20:15:03 2002 UTC
# Line 185  functions can modify it.") Line 185  functions can modify it.")
185    "Undo, but disabling motion-hooks and read-only attributes.    "Undo, but disabling motion-hooks and read-only attributes.
186  Do the undo COUNT times."  Do the undo COUNT times."
187    (interactive "P")    (interactive "P")
188    (let ((old-inhibit-read-only inhibit-read-only)    (let ((inhibit-read-only t)
189          (old-motion-hooks inhibit-point-motion-hooks))          (inhibit-point-motion-hooks t))
190      (unwind-protect      (advertised-undo count)))
         (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))))  
191    
192  (defun gnats-mark-field-edited (field)  (defun gnats-mark-field-edited (field)
193    "Mark FIELD as having been edited.    "Mark FIELD as having been edited.
# Line 229  CURR-POINT must be a point within the fi Line 223  CURR-POINT must be a point within the fi
223    "Replace FIELD's text in the edit buffer with NEW-TEXT."    "Replace FIELD's text in the edit buffer with NEW-TEXT."
224    (let* ((curr-point (point))    (let* ((curr-point (point))
225           (start (gnats-find-field-start field curr-point))           (start (gnats-find-field-start field curr-point))
226           (end (next-single-property-change curr-point 'gnats-field-name)))           (end (next-single-property-change curr-point 'gnats-field-name))
227      (let ((old-inhibit-read-only inhibit-read-only)           (inhibit-read-only t)
228            (old-motion-hooks inhibit-point-motion-hooks))           (inhibit-point-motion-hooks t))
229        (unwind-protect      (delete-region start end)
230            (progn      ;; Make the undo atomic.
231              (setq inhibit-read-only t)      (if (and (listp buffer-undo-list) (null (car buffer-undo-list)))
232              (setq inhibit-point-motion-hooks t)          (setq buffer-undo-list (cdr buffer-undo-list)))
233              (delete-region start end)      (goto-char start)
234              ;; Make the undo atomic.      (gnats-insert-text field new-text t
235              (if (and (listp buffer-undo-list) (null (car buffer-undo-list)))                         (list 'read-only t 'mouse-face 'highlight
236                  (setq buffer-undo-list (cdr buffer-undo-list)))                               'local-map gnats-edit-button-map))))
             (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)))))  
237    
238  (defun gnats-delete-field (field)  (defun gnats-delete-field (field)
239    "Remove FIELD entirely from the PR.    "Remove FIELD entirely from the PR.

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26