diff options
| author | Stefan Monnier | 2007-07-20 20:09:44 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-20 20:09:44 +0000 |
| commit | e1f5b0ed242201bb6f874de0455a1056e45bc9c5 (patch) | |
| tree | b63850a90341a0010658264c4154c8a25b12b518 | |
| parent | 6655f0bfc967229d6383f193fb506561a84f5ba6 (diff) | |
| download | emacs-e1f5b0ed242201bb6f874de0455a1056e45bc9c5.tar.gz emacs-e1f5b0ed242201bb6f874de0455a1056e45bc9c5.zip | |
(add-log-file-name): Use file-relative-name.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/add-log.el | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f50142089e..a2caa435129 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2007-07-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-07-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * add-log.el (add-log-file-name): Use file-relative-name. | ||
| 4 | |||
| 3 | * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use a directory | 5 | * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use a directory |
| 4 | name for buffer-file-name if it refers to a directory. | 6 | name for buffer-file-name if it refers to a directory. |
| 5 | 7 | ||
diff --git a/lisp/add-log.el b/lisp/add-log.el index 0ff82bba2f5..1e7284514f1 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -460,11 +460,7 @@ Optional arg BUFFER-FILE overrides `buffer-file-name'." | |||
| 460 | (if add-log-file-name-function | 460 | (if add-log-file-name-function |
| 461 | (funcall add-log-file-name-function buffer-file) | 461 | (funcall add-log-file-name-function buffer-file) |
| 462 | (setq buffer-file | 462 | (setq buffer-file |
| 463 | (if (string-match | 463 | (file-relative-name buffer-file (file-name-directory log-file))) |
| 464 | (concat "^" (regexp-quote (file-name-directory log-file))) | ||
| 465 | buffer-file) | ||
| 466 | (substring buffer-file (match-end 0)) | ||
| 467 | (file-name-nondirectory buffer-file))) | ||
| 468 | ;; If we have a backup file, it's presumably because we're | 464 | ;; If we have a backup file, it's presumably because we're |
| 469 | ;; comparing old and new versions (e.g. for deleted | 465 | ;; comparing old and new versions (e.g. for deleted |
| 470 | ;; functions) and we'll want to use the original name. | 466 | ;; functions) and we'll want to use the original name. |