changeset 78195:896bf6c07ad3

(cvs-mode-add-change-log-entry-other-window): Use a directory name for buffer-file-name if it refers to a directory.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 23 Jul 2007 05:32:32 +0000
parents 7952bfb04478
children 2e0600da7d6a
files lisp/ChangeLog lisp/pcvs.el
diffstat 2 files changed, 19 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Jul 22 22:55:09 2007 +0000
+++ b/lisp/ChangeLog	Mon Jul 23 05:32:32 2007 +0000
@@ -1,3 +1,8 @@
+2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs.el (cvs-mode-add-change-log-entry-other-window): Use a directory
+	name for buffer-file-name if it refers to a directory.
+
 2007-07-22  Jason Rumney  <jasonr@gnu.org>
 
 	* w32-fns.el (set-default-process-coding-system): Use dos line ends
@@ -51,8 +56,7 @@
 	(vc-hg-next-version, vc-hg-delete-file, vc-hg-rename-file)
 	(vc-hg-register, vc-hg-create-repo, vc-hg-checkin)
 	(vc-hg-revert): Likewise.
-	(vc-hg-revision-table, vc-hg-revision-completion-table): New
-	functions.
+	(vc-hg-revision-table, vc-hg-revision-completion-table): New functions.
 
 2007-07-21  Thien-Thi Nguyen  <ttn@gnuvola.org>
 
@@ -186,8 +190,8 @@
 
 	* longlines.el (longlines-wrap-region): Avoid marking buffer as
 	modified.
-	(longlines-auto-wrap, longlines-window-change-function): Remove
-	unnecessary calls to set-buffer-modified-p.
+	(longlines-auto-wrap, longlines-window-change-function):
+	Remove unnecessary calls to set-buffer-modified-p.
 
 2007-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -496,8 +500,8 @@
 	* calendar/timeclock.el: Update version number.
 	(timeclock-modeline-display): Mention timeclock-use-display-time
 	in explanatory message.
-	(timeclock-log): Suppress warnings when finding the log.  Don't
-	check for a nil project twice.  Run hooks after killing the
+	(timeclock-log): Suppress warnings when finding the log.
+	Don't check for a nil project twice.  Run hooks after killing the
 	buffer (if applicable).
 	(timeclock-geometric-mean): Rename to `timeclock-mean' (it never
 	was geometric).  All uses changed.
@@ -515,8 +519,8 @@
 
 2007-06-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-	* mail/mail-extr.el (mail-extract-address-components): Recognize
-	non-ASCII characters except for NBSP as words.
+	* mail/mail-extr.el (mail-extract-address-components):
+	Recognize non-ASCII characters except for NBSP as words.
 
 2007-06-04  Ryan Yeske  <rcyeske@gmail.com>
 
@@ -544,8 +548,7 @@
 	* files.el (magic-mode-alist): Remove image-type-auto-detected-p.
 	(magic-fallback-mode-alist): Add image-type-auto-detected-p.
 
-	* image.el (image-type-auto-detected-p): Don't scan
-	auto-mode-alist.
+	* image.el (image-type-auto-detected-p): Don't scan auto-mode-alist.
 
 	* longlines.el (longlines-mode): Make longlines-auto-wrap
 	buffer-local.  Add hooks unconditionally.
@@ -569,8 +572,8 @@
 2007-05-29  Martin Rudalics  <rudalics@gmx.at>
 
 	* textmodes/table.el (table--point-entered-cell-function)
-	(table--point-left-cell-function): Bind
-	`inhibit-point-motion-hooks' to t.
+	(table--point-left-cell-function):
+	Bind `inhibit-point-motion-hooks' to t.
 
 2007-05-29  Nikolaj Schumacher  <n_schumacher@web.de>  (tiny change)
 
--- a/lisp/pcvs.el	Sun Jul 22 22:55:09 2007 +0000
+++ b/lisp/pcvs.el	Mon Jul 23 05:32:32 2007 +0000
@@ -2207,6 +2207,10 @@
   (dolist (fi (cvs-mode-marked nil nil))
     (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi)))
 	   (buffer-file-name (expand-file-name (cvs-fileinfo->file fi))))
+      (if (file-directory-p buffer-file-name)
+          ;; Be careful to use a directory name, otherwise add-log starts
+          ;; looking for a ChangeLog file in the parent dir.
+          (setq buffer-file-name (file-name-as-directory buffer-file-name)))
       (kill-local-variable 'change-log-default-name)
       (save-excursion (add-change-log-entry-other-window)))))