emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/add-log.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/add-log.el,v
Date: Fri, 20 Jul 2007 20:09:46 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/07/20 20:09:46

Index: add-log.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -b -r1.186 -r1.187
--- add-log.el  18 Jul 2007 08:54:43 -0000      1.186
+++ add-log.el  20 Jul 2007 20:09:44 -0000      1.187
@@ -460,11 +460,7 @@
     (if add-log-file-name-function
        (funcall add-log-file-name-function buffer-file)
       (setq buffer-file
-           (if (string-match
-                (concat "^" (regexp-quote (file-name-directory log-file)))
-                buffer-file)
-               (substring buffer-file (match-end 0))
-             (file-name-nondirectory buffer-file)))
+            (file-relative-name buffer-file (file-name-directory log-file)))
       ;; If we have a backup file, it's presumably because we're
       ;; comparing old and new versions (e.g. for deleted
       ;; functions) and we'll want to use the original name.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]