comparison lisp/pcvs.el @ 47468:de490e9b55fa

(cvs-mode-find-file): Work even if point is at beg-of-line.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 13 Sep 2002 18:25:26 +0000
parents 3a7c7e0c12f7
children 344fed0ec431
comparison
equal deleted inserted replaced
47467:c5035e184eba 47468:de490e9b55fa
12 ;; (Stefan Monnier) monnier@cs.yale.edu 12 ;; (Stefan Monnier) monnier@cs.yale.edu
13 ;; (Greg Klanderman) greg@alphatech.com 13 ;; (Greg Klanderman) greg@alphatech.com
14 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com 14 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
15 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu 15 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
16 ;; Keywords: CVS, version control, release management 16 ;; Keywords: CVS, version control, release management
17 ;; Revision: $Id: pcvs.el,v 1.38 2002/06/25 00:11:28 monnier Exp $ 17 ;; Revision: $Id: pcvs.el,v 1.39 2002/09/03 01:40:29 monnier Exp $
18 18
19 ;; This file is part of GNU Emacs. 19 ;; This file is part of GNU Emacs.
20 20
21 ;; GNU Emacs is free software; you can redistribute it and/or modify 21 ;; GNU Emacs is free software; you can redistribute it and/or modify
22 ;; it under the terms of the GNU General Public License as published by 22 ;; it under the terms of the GNU General Public License as published by
1886 (defun cvs-mode-find-file (e &optional other) 1886 (defun cvs-mode-find-file (e &optional other)
1887 "Select a buffer containing the file. 1887 "Select a buffer containing the file.
1888 With a prefix, opens the buffer in an OTHER window." 1888 With a prefix, opens the buffer in an OTHER window."
1889 (interactive (list last-input-event current-prefix-arg)) 1889 (interactive (list last-input-event current-prefix-arg))
1890 (when (ignore-errors (mouse-set-point e) t) ;for invocation via the mouse 1890 (when (ignore-errors (mouse-set-point e) t) ;for invocation via the mouse
1891 (unless (memq (get-text-property (point) 'face) 1891 (unless (memq (get-text-property (1- (line-end-position)) 'face)
1892 '(cvs-header-face cvs-filename-face)) 1892 '(cvs-header-face cvs-filename-face))
1893 (error "Not a file name"))) 1893 (error "Not a file name")))
1894 (cvs-mode! 1894 (cvs-mode!
1895 (lambda (&optional rev) 1895 (lambda (&optional rev)
1896 (interactive (list (cvs-prefix-get 'cvs-branch-prefix))) 1896 (interactive (list (cvs-prefix-get 'cvs-branch-prefix)))