Mercurial > emacs
changeset 54870:3b1741ff0676
(cvs-mode-toggle-mark): Rename from cvs-mouse-toggle-mark.
Make it work for non-mouse events.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 14 Apr 2004 17:36:09 +0000 |
parents | c491468e3c18 |
children | 22cdf6999b11 |
files | lisp/pcvs.el |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/pcvs.el Wed Apr 14 17:31:42 2004 +0000 +++ b/lisp/pcvs.el Wed Apr 14 17:36:09 2004 +0000 @@ -1194,11 +1194,12 @@ (ewoc-invalidate cvs-cookies tin) (cvs-mode-next-line 1)))) -(defun cvs-mouse-toggle-mark (e) - "Toggle the mark of the entry under the mouse." - (interactive "e") +(defalias 'cvs-mouse-toggle-mark 'cvs-mode-toggle-mark) +(defun cvs-mode-toggle-mark (e) + "Toggle the mark of the entry at point." + (interactive (list last-input-event)) (save-excursion - (mouse-set-point e) + (posn-set-point (event-end e)) (cvs-mode-mark 'toggle))) (defun-cvs-mode cvs-mode-unmark () @@ -1930,7 +1931,7 @@ With a prefix, opens the buffer in an OTHER window." (interactive (list last-input-event current-prefix-arg)) ;; If the event moves point, check that it moves it to a valid location. - (when (and (/= (point) (progn (ignore-errors (mouse-set-point e)) (point))) + (when (and (/= (point) (progn (posn-set-point (event-end e)) (point))) (not (memq (get-text-property (1- (line-end-position)) 'font-lock-face) '(cvs-header-face cvs-filename-face))))