diff options
author | Lawrence Mitchell <wence@gmx.li> | 2012-06-14 10:37:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-14 10:59:15 -0700 |
commit | 0e59a6f6018182e6648789904672b738a944a524 (patch) | |
tree | 3306ba7315071020db133d3177d3a6a1ad1fec58 /Documentation/technical/api-strbuf.txt | |
parent | git-blame.el: Do not use goto-line in lisp code (diff) | |
download | tgif-0e59a6f6018182e6648789904672b738a944a524.tar.xz |
git-blame.el: Use with-current-buffer where appropriate
In git-blame-filter and git-blame-create-overlay we want to save
(along with the values of point and mark) the current-buffer in scope
when calling the functions. The idiom
(save-excursion
(set-buffer buf)
...)
will correctly restore the correct buffer, but will not save the
values of point and mark in buf (only in the buffer current when the
save-excursion call is executed). The intention of these functions is
to save the current buffer from the calling scope and the values of
point and mark in the buffer they are modifying. The correct idiom
for this is
(with-current-buffer buf
(save-excursion
...))
Signed-off-by: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Lawrence Mitchell <wence@gmx.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-strbuf.txt')
0 files changed, 0 insertions, 0 deletions