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

Advising expand-region



This is an interesting package that grows the region around point on
successive invocations of expand-region, according to the syntax of the text
in the buffer. You can also use contract-region if you have expanded too far.

git clone git://github.com/magnars/expand-region.el.git expand-region

Attached is preliminary Emacspeak advice for this package.

It would benefit from testing and feedback - comments welcome.

(loop for f in
      '(er/expand-region
	er/contract-region)
      do
      (eval `(defadvice ,f (around emacspeak pre act comp)
	       "Provide auditory feedback."
	       (let ((emacspeak-speak-messages)
		     (history er/history))
		 ad-do-it
		 (when (interactive-p)
		   (let ((deactivate-mark))
		     (unless (eql history er/history)
		       (emacspeak-auditory-icon 'mark-object)
		       (ems-set-personality-temporarily (point) (mark) 'animate
							(emacspeak-speak-region (point) (mark))))))))))


If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog