[Prev][Next][Index][Thread][Search]

Minor patch to emacspeak 6.0



A minor patch--but catches a major bug--

Thanks to Greg for spotting this one.

Emacspeak 6.0 had a problem in certain contexts when doing an interactive
query replace.

Appended is a patch to emacspeak-replace.el --I just tested it and it fixes
(hopefully) the last of the replace problems.

And here is an emacspeak/emacs tip:

Did you know about epatch?

Type M-x epatch while reading this message and watch the fun--
you can apply the patch and get things running right from inside email.

(make sure the emacspeak-replace.el is writeable before applying the patch)



*** emacspeak-replace.el	1997/05/01 18:06:27	6.0
--- emacspeak-replace.el	1997/05/05 21:58:47
***************
*** 89,116 ****
    (declare (special emacspeak-replace-highlight-on
                      emacspeak-replace-saved-personality
                      emacspeak-replace-start emacspeak-replace-end))
!   (let ((from (ad-get-arg 0))
!         (to (ad-get-arg 1 ))
!         (dtk-stop-immediately nil))
!     (condition-case nil
!         (progn 
!           (and emacspeak-replace-highlight-on
!                emacspeak-replace-start 
!                emacspeak-replace-end
!                (put-text-property 
!                 (max emacspeak-replace-start  (point-min))
!                 (min emacspeak-replace-end   (point-max))
!                 'personality   emacspeak-replace-saved-personality))
!           (setq emacspeak-replace-highlight-on t
!                 emacspeak-replace-start from
!                 emacspeak-replace-end  to 
!                 emacspeak-replace-saved-personality
!                 (get-text-property  from 'personality))
!           (and from to 
!                (put-text-property from to 'personality
!                                   'emacspeak-replace-personality ))
!           (emacspeak-speak-line))
! (error nil ))))
  
  (defadvice replace-dehighlight (after emacspeak pre act)
    "Turn off the replacement highlight. "
--- 89,117 ----
    (declare (special emacspeak-replace-highlight-on
                      emacspeak-replace-saved-personality
                      emacspeak-replace-start emacspeak-replace-end))
!   (save-match-data
!     (let ((from (ad-get-arg 0))
!           (to (ad-get-arg 1 ))
!           (dtk-stop-immediately nil))
!       (condition-case nil
!           (progn 
!             (and emacspeak-replace-highlight-on
!                  emacspeak-replace-start 
!                  emacspeak-replace-end
!                  (put-text-property 
!                   (max emacspeak-replace-start  (point-min))
!                   (min emacspeak-replace-end   (point-max))
!                   'personality   emacspeak-replace-saved-personality))
!             (setq emacspeak-replace-highlight-on t
!                   emacspeak-replace-start from
!                   emacspeak-replace-end  to 
!                   emacspeak-replace-saved-personality
!                   (get-text-property  from 'personality))
!             (and from to 
!                  (put-text-property from to 'personality
!                                     'emacspeak-replace-personality ))
!             (emacspeak-speak-line))
!         (error nil )))))
  
  (defadvice replace-dehighlight (after emacspeak pre act)
    "Turn off the replacement highlight. "
***************
*** 117,123 ****
    (declare (special emacspeak-replace-highlight-on
                      emacspeak-replace-saved-personality
                      emacspeak-replace-start emacspeak-replace-end))
!   (condition-case nil
        (progn
    (and emacspeak-replace-highlight-on
         emacspeak-replace-start
--- 118,125 ----
    (declare (special emacspeak-replace-highlight-on
                      emacspeak-replace-saved-personality
                      emacspeak-replace-start emacspeak-replace-end))
!   (save-match-data
!     (condition-case nil
        (progn
    (and emacspeak-replace-highlight-on
         emacspeak-replace-start
***************
*** 129,135 ****
         (setq emacspeak-replace-start nil
               emacspeak-replace-end nil
               emacspeak-replace-highlight-on nil)))
!     (error  nil )))
      
  
  ;;}}}
--- 131,137 ----
         (setq emacspeak-replace-start nil
               emacspeak-replace-end nil
               emacspeak-replace-highlight-on nil)))
!     (error  nil ))))
      
  
  ;;}}}

-- 
Best Regards,
--raman

      Adobe Systems                 Tel: 1 (408) 536 3945   (W14-129)
      Advanced Technology Group     Fax: 1 (408) 537 4042 
      (W14 129) 345 Park Avenue     Email: raman@xxxxxxxxxxx 
      San Jose , CA 95110 -2704     Email:  raman@xxxxxxxxxxx
      http://labrador.corp.adobe.com/~raman/raman.html (Adobe  Internal)
      http://www.cs.cornell.edu/Info/People/raman/raman.html  (Cornell)
-----------------------------------------------------------------------
    Disclaimer: The opinions expressed are my own and in no way should be taken
as representative of my employer, Adobe Systems Inc.
____________________________________________________________

-- 
Best Regards,
--raman

      Adobe Systems                 Tel: 1 (408) 536 3945   (W14-129)
      Advanced Technology Group     Fax: 1 (408) 537 4042 
      (W14 129) 345 Park Avenue     Email: raman@xxxxxxxxxxx 
      San Jose , CA 95110 -2704     Email:  raman@xxxxxxxxxxx
      http://labrador.corp.adobe.com/~raman/raman.html (Adobe  Internal)
      http://www.cs.cornell.edu/Info/People/raman/raman.html  (Cornell)
-----------------------------------------------------------------------
    Disclaimer: The opinions expressed are my own and in no way should be taken
as representative of my employer, Adobe Systems Inc.
____________________________________________________________