diff options
author | Aaron Ecay <aaronecay@gmail.com> | 2013-04-03 13:11:25 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-04-03 13:11:25 +0200 |
commit | 69eb39a4a938a56b206760a49757d16484041b66 (patch) | |
tree | 497d1a5e694b5143527b50c7f2ddda0fb8687f38 | |
parent | 137fd35b6420eca1afadd3c62592bf68e26257da (diff) | |
download | org-mode-69eb39a4a938a56b206760a49757d16484041b66.tar.gz |
contrib/lisp/org-git-link.el: Small fixes
* contrib/lisp/org-git-link.el: Wrap into `eval-and-compile'
to silent warnings.
(org-git-show): Use `with-current-buffer' instead
of (save-excursion (set-buffer ...))
TINYCHANGE
-rw-r--r-- | contrib/lisp/org-git-link.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/lisp/org-git-link.el b/contrib/lisp/org-git-link.el index a4759c9..b9e6a4e 100644 --- a/contrib/lisp/org-git-link.el +++ b/contrib/lisp/org-git-link.el @@ -132,10 +132,11 @@ (list (expand-file-name ".git" dir) relpath)))) -(if (featurep 'xemacs) - (defalias 'org-git-gitrepos-p 'org-git-find-gitdir) - (defalias 'org-git-gitrepos-p 'org-git-find-gitdir - "Return non-nil if path is in git repository")) +(eval-and-compile + (if (featurep 'xemacs) + (defalias 'org-git-gitrepos-p 'org-git-find-gitdir) + (defalias 'org-git-gitrepos-p 'org-git-find-gitdir + "Return non-nil if path is in git repository"))) ;; splitting the link string @@ -196,8 +197,7 @@ (unless (zerop (call-process org-git-program nil buffer nil "--no-pager" (concat "--git-dir=" gitdir) "show" object)) - (error "git error: %s " (save-excursion (set-buffer buffer) - (buffer-string))))) + (error "git error: %s " (with-current-buffer buffer (buffer-string))))) (defun org-git-blob-sha (gitdir object) "Return sha of the referenced object" |