comparison lisp/prim/mouse.el @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents 131b0175ea99
children cf808b4c4290
comparison
equal deleted inserted replaced
73:e2d7a37b7c8d 74:54cc21c15cbb
769 769
770 (defun default-mouse-track-normalize-point (type forwardp) 770 (defun default-mouse-track-normalize-point (type forwardp)
771 (cond ((eq type 'word) 771 (cond ((eq type 'word)
772 ;; trap the beginning and end of buffer errors 772 ;; trap the beginning and end of buffer errors
773 (condition-case () 773 (condition-case ()
774 (if forwardp 774 (progn
775 (default-mouse-track-end-of-word t) 775 (setq type (char-syntax (char-after (point))))
776 (default-mouse-track-beginning-of-word t)) 776 (if forwardp
777 (if (= type ?\()
778 (goto-char (scan-sexps (point) 1))
779 (if (= type ?\))
780 (forward-char 1)
781 (default-mouse-track-end-of-word t)))
782 (if (= type ?\))
783 (goto-char (scan-sexps (1+ (point)) -1))
784 (default-mouse-track-beginning-of-word t))))
777 (error ()))) 785 (error ())))
778 ((eq type 'line) 786 ((eq type 'line)
779 (if forwardp (end-of-line) (beginning-of-line))) 787 (if forwardp (end-of-line) (beginning-of-line)))
780 ((eq type 'buffer) 788 ((eq type 'buffer)
781 (if forwardp (end-of-buffer) (beginning-of-buffer))))) 789 (if forwardp (end-of-buffer) (beginning-of-buffer)))))