I'd ideally like to get this working without tampering with
zmacs-regions.
So here goes.
Type some text, set the mark.
The mark is set correctly as evinced by moving the cursor
and executing C-x C-x
(I've seen the zmacs-regions documentation and it does say
explicitly that c-x c-x is one command that will still work
even if the mark becomes inactive...)
So going back to the test,
with zmacs-regions set to the default value of t
type some text; set the mark by executing C-x h
--region is hopefully active.
now hit C-w --with emacspeak loaded this throws a "mark is
not active now"
--so here is what emacspeak does to the kill-region command
--hopefully this will shed some light on what is
deactivating the mark.
I'll annotate the advice definition some for those of you
who dont hack advice.
;;; around advice means you get called *instead of * the
;;;original defun.
;;; in the advice below, we will check if we were called
;;; interactively --and if so --speak some info about what is
;;;getting nuked by kill-region
(defadvice kill-region (around emacspeak pre act)
"Indicate region has been killed.
Use an auditory icon if possible."
(cond
((interactive-p)
;;;so let's produce auditory feedback
(let ((count (count-lines (region-beginning)
(region-end))))
;;;call original version of kill-region
ad-do-it
(emacspeak-auditory-icon 'delete-object )
(message "Killed region containing %s lines" count)))
;;;called programmatically so just default behavior
(t ad-do-it))
;;;return computed value so caller doesn't get confused by
;;;advised version
ad-return-value)
--
Best Regards,
--raman
Email: raman(a)cs.cornell.edu
WWW:
http://cs.cornell.edu/home/raman/
PGP:
http://cs.cornell.edu/home/raman/raman.asc