diff options
| author | Stefan Monnier | 2010-08-21 16:09:46 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-21 16:09:46 +0200 |
| commit | 537ffaf3c900034f9ff6ffc3cd70bf806e531066 (patch) | |
| tree | 7f1e91b89f65471a40f94e1a9fad32f15e393f28 | |
| parent | 0deaf02ae1a4d8b0b69e1b3303424dfff4c3f8d1 (diff) | |
| download | emacs-537ffaf3c900034f9ff6ffc3cd70bf806e531066.tar.gz emacs-537ffaf3c900034f9ff6ffc3cd70bf806e531066.zip | |
* lisp/vc/add-log.el (add-log-file-name): Don't get confused by symlinks.
| -rw-r--r-- | lisp/ChangeLog | 31 | ||||
| -rw-r--r-- | lisp/vc/add-log.el | 12 |
2 files changed, 28 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b717877dcf5..db5bc124626 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc/add-log.el (add-log-file-name): Don't get confused by symlinks. | ||
| 4 | |||
| 1 | 2010-08-21 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-08-21 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * mouse.el (mouse-save-then-kill): Don't save region to kill ring | 7 | * mouse.el (mouse-save-then-kill): Don't save region to kill ring |
| @@ -10,19 +14,18 @@ | |||
| 10 | 2010-08-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 14 | 2010-08-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 11 | 15 | ||
| 12 | * whitespace.el: Fix slow cursor movement. Reported by Christoph | 16 | * whitespace.el: Fix slow cursor movement. Reported by Christoph |
| 13 | Groth <cwg@falma.de> and Liu Xin <x_liu@neusoft.com>. New version | 17 | Groth <cwg@falma.de> and Liu Xin <x_liu@neusoft.com>. |
| 14 | 13.0. | 18 | New version 13.0. |
| 15 | (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp): | 19 | (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp): |
| 16 | Adjust initialization. | 20 | Adjust initialization. |
| 17 | (whitespace-bob-marker, whitespace-eob-marker) | 21 | (whitespace-bob-marker, whitespace-eob-marker) |
| 18 | (whitespace-buffer-changed): New vars. | 22 | (whitespace-buffer-changed): New vars. |
| 19 | (whitespace-cleanup, whitespace-color-on, whitespace-color-off) | 23 | (whitespace-cleanup, whitespace-color-on, whitespace-color-off) |
| 20 | (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp) | 24 | (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp) |
| 21 | (whitespace-post-command-hook, whitespace-display-char-on): Adjust | 25 | (whitespace-post-command-hook, whitespace-display-char-on): |
| 22 | code. | 26 | Adjust code. |
| 23 | (whitespace-looking-back, whitespace-buffer-changed): New funs. | 27 | (whitespace-looking-back, whitespace-buffer-changed): New funs. |
| 24 | (whitespace-space-regexp, whitespace-tab-regexp): Eliminated | 28 | (whitespace-space-regexp, whitespace-tab-regexp): Eliminate funs. |
| 25 | funs. | ||
| 26 | 29 | ||
| 27 | 2010-08-19 Stefan Monnier <monnier@iro.umontreal.ca> | 30 | 2010-08-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 28 | 31 | ||
| @@ -3227,7 +3230,8 @@ | |||
| 3227 | * minibuffer.el (tags-completion-at-point-function): New function. | 3230 | * minibuffer.el (tags-completion-at-point-function): New function. |
| 3228 | (completion-at-point-functions): Use it. | 3231 | (completion-at-point-functions): Use it. |
| 3229 | 3232 | ||
| 3230 | * cedet/semantic.el (semantic-completion-at-point-function): New function. | 3233 | * cedet/semantic.el (semantic-completion-at-point-function): |
| 3234 | New function. | ||
| 3231 | (semantic-mode): Use semantic-completion-at-point-function for | 3235 | (semantic-mode): Use semantic-completion-at-point-function for |
| 3232 | completion-at-point-functions instead. | 3236 | completion-at-point-functions instead. |
| 3233 | 3237 | ||
| @@ -3277,8 +3281,8 @@ | |||
| 3277 | 3281 | ||
| 3278 | 2010-04-28 Chong Yidong <cyd@stupidchicken.com> | 3282 | 2010-04-28 Chong Yidong <cyd@stupidchicken.com> |
| 3279 | 3283 | ||
| 3280 | * progmodes/bug-reference.el (bug-reference-url-format): Revert | 3284 | * progmodes/bug-reference.el (bug-reference-url-format): |
| 3281 | 2010-04-27 change due to security risk. | 3285 | Revert 2010-04-27 change due to security risk. |
| 3282 | 3286 | ||
| 3283 | 2010-04-28 Stefan Monnier <monnier@iro.umontreal.ca> | 3287 | 2010-04-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 3284 | 3288 | ||
| @@ -3453,8 +3457,7 @@ | |||
| 3453 | 3457 | ||
| 3454 | * ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o | 3458 | * ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o |
| 3455 | toggles the use of virtual buffers. | 3459 | toggles the use of virtual buffers. |
| 3456 | (ido-buffer-internal): Guard `ido-use-virtual-buffers' global | 3460 | (ido-buffer-internal): Guard `ido-use-virtual-buffers' global value. |
| 3457 | value. | ||
| 3458 | (ido-toggle-virtual-buffers): New function. | 3461 | (ido-toggle-virtual-buffers): New function. |
| 3459 | 3462 | ||
| 3460 | 2010-04-21 Juanma Barranquero <lekktu@gmail.com> | 3463 | 2010-04-21 Juanma Barranquero <lekktu@gmail.com> |
| @@ -4031,7 +4034,7 @@ | |||
| 4031 | 4034 | ||
| 4032 | Enable recentf-mode if using virtual buffers. | 4035 | Enable recentf-mode if using virtual buffers. |
| 4033 | * ido.el (recentf-list): Declare for byte-compiler. | 4036 | * ido.el (recentf-list): Declare for byte-compiler. |
| 4034 | (ido-virtual-buffers): Move up to silence byte-compiler. Add docstring. | 4037 | (ido-virtual-buffers): Move up to silence byte-compiler. Add docstring. |
| 4035 | (ido-make-buffer-list): Simplify. | 4038 | (ido-make-buffer-list): Simplify. |
| 4036 | (ido-add-virtual-buffers-to-list): Simplify. Enable recentf-mode. | 4039 | (ido-add-virtual-buffers-to-list): Simplify. Enable recentf-mode. |
| 4037 | 4040 | ||
| @@ -5542,8 +5545,8 @@ | |||
| 5542 | 2010-01-21 Alan Mackenzie <acm@muc.de> | 5545 | 2010-01-21 Alan Mackenzie <acm@muc.de> |
| 5543 | 5546 | ||
| 5544 | Fix a situation where deletion of a cpp construct throws an error. | 5547 | Fix a situation where deletion of a cpp construct throws an error. |
| 5545 | * progmodes/cc-engine.el (c-invalidate-state-cache): Before | 5548 | * progmodes/cc-engine.el (c-invalidate-state-cache): |
| 5546 | invoking c-with-all-but-one-cpps-commented-out, check that the | 5549 | Before invoking c-with-all-but-one-cpps-commented-out, check that the |
| 5547 | special cpp construct is still in the buffer. | 5550 | special cpp construct is still in the buffer. |
| 5548 | (c-parse-state): Record the special cpp with markers, not numbers. | 5551 | (c-parse-state): Record the special cpp with markers, not numbers. |
| 5549 | 5552 | ||
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index cf391b2f9ac..23f1e33f181 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el | |||
| @@ -755,7 +755,17 @@ Optional arg BUFFER-FILE overrides `buffer-file-name'." | |||
| 755 | (if add-log-file-name-function | 755 | (if add-log-file-name-function |
| 756 | (funcall add-log-file-name-function buffer-file) | 756 | (funcall add-log-file-name-function buffer-file) |
| 757 | (setq buffer-file | 757 | (setq buffer-file |
| 758 | (file-relative-name buffer-file (file-name-directory log-file))) | 758 | (let* ((dir (file-name-directory log-file)) |
| 759 | (rel (file-relative-name buffer-file dir))) | ||
| 760 | ;; Sometimes with symlinks, the two buffers may have names that | ||
| 761 | ;; appear to belong to different directory trees. So check the | ||
| 762 | ;; file-truenames, to see if we get a better result. | ||
| 763 | (if (not (string-match "\\`\\.\\./" rel)) | ||
| 764 | rel | ||
| 765 | (let ((new (file-relative-name (file-truename buffer-file) | ||
| 766 | (file-truename dir)))) | ||
| 767 | (if (< (length new) (length rel)) | ||
| 768 | new rel))))) | ||
| 759 | ;; If we have a backup file, it's presumably because we're | 769 | ;; If we have a backup file, it's presumably because we're |
| 760 | ;; comparing old and new versions (e.g. for deleted | 770 | ;; comparing old and new versions (e.g. for deleted |
| 761 | ;; functions) and we'll want to use the original name. | 771 | ;; functions) and we'll want to use the original name. |