Mercurial > emacs
comparison lisp/pcvs.el @ 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 | 261ba76ae244 |
children | f673d8bf105a |
comparison
equal
deleted
inserted
replaced
54869:c491468e3c18 | 54870:3b1741ff0676 |
---|---|
1192 (setf (cvs-fileinfo->marked fi) | 1192 (setf (cvs-fileinfo->marked fi) |
1193 (not (if (eq arg 'toggle) (cvs-fileinfo->marked fi) arg))) | 1193 (not (if (eq arg 'toggle) (cvs-fileinfo->marked fi) arg))) |
1194 (ewoc-invalidate cvs-cookies tin) | 1194 (ewoc-invalidate cvs-cookies tin) |
1195 (cvs-mode-next-line 1)))) | 1195 (cvs-mode-next-line 1)))) |
1196 | 1196 |
1197 (defun cvs-mouse-toggle-mark (e) | 1197 (defalias 'cvs-mouse-toggle-mark 'cvs-mode-toggle-mark) |
1198 "Toggle the mark of the entry under the mouse." | 1198 (defun cvs-mode-toggle-mark (e) |
1199 (interactive "e") | 1199 "Toggle the mark of the entry at point." |
1200 (interactive (list last-input-event)) | |
1200 (save-excursion | 1201 (save-excursion |
1201 (mouse-set-point e) | 1202 (posn-set-point (event-end e)) |
1202 (cvs-mode-mark 'toggle))) | 1203 (cvs-mode-mark 'toggle))) |
1203 | 1204 |
1204 (defun-cvs-mode cvs-mode-unmark () | 1205 (defun-cvs-mode cvs-mode-unmark () |
1205 "Unmark the fileinfo on the current line." | 1206 "Unmark the fileinfo on the current line." |
1206 (interactive) | 1207 (interactive) |
1928 (defun cvs-mode-find-file (e &optional other) | 1929 (defun cvs-mode-find-file (e &optional other) |
1929 "Select a buffer containing the file. | 1930 "Select a buffer containing the file. |
1930 With a prefix, opens the buffer in an OTHER window." | 1931 With a prefix, opens the buffer in an OTHER window." |
1931 (interactive (list last-input-event current-prefix-arg)) | 1932 (interactive (list last-input-event current-prefix-arg)) |
1932 ;; If the event moves point, check that it moves it to a valid location. | 1933 ;; If the event moves point, check that it moves it to a valid location. |
1933 (when (and (/= (point) (progn (ignore-errors (mouse-set-point e)) (point))) | 1934 (when (and (/= (point) (progn (posn-set-point (event-end e)) (point))) |
1934 (not (memq (get-text-property (1- (line-end-position)) | 1935 (not (memq (get-text-property (1- (line-end-position)) |
1935 'font-lock-face) | 1936 'font-lock-face) |
1936 '(cvs-header-face cvs-filename-face)))) | 1937 '(cvs-header-face cvs-filename-face)))) |
1937 (error "Not a file name")) | 1938 (error "Not a file name")) |
1938 (cvs-mode! | 1939 (cvs-mode! |