Mercurial > emacs
comparison lisp/pcvs.el @ 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 | 4986050dd338 |
children | 4a6aba4ac8b1 492971a3f31f |
comparison
equal
deleted
inserted
replaced
78194:7952bfb04478 | 78195:896bf6c07ad3 |
---|---|
2205 "Add a ChangeLog entry in the ChangeLog of the current directory." | 2205 "Add a ChangeLog entry in the ChangeLog of the current directory." |
2206 (interactive) | 2206 (interactive) |
2207 (dolist (fi (cvs-mode-marked nil nil)) | 2207 (dolist (fi (cvs-mode-marked nil nil)) |
2208 (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) | 2208 (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) |
2209 (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) | 2209 (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) |
2210 (if (file-directory-p buffer-file-name) | |
2211 ;; Be careful to use a directory name, otherwise add-log starts | |
2212 ;; looking for a ChangeLog file in the parent dir. | |
2213 (setq buffer-file-name (file-name-as-directory buffer-file-name))) | |
2210 (kill-local-variable 'change-log-default-name) | 2214 (kill-local-variable 'change-log-default-name) |
2211 (save-excursion (add-change-log-entry-other-window))))) | 2215 (save-excursion (add-change-log-entry-other-window))))) |
2212 | 2216 |
2213 ;; interactive commands to set optional flags | 2217 ;; interactive commands to set optional flags |
2214 | 2218 |