diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-18 16:39:44 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-18 16:49:58 +0200 |
commit | b93416952602260f92812eeade4d15380e546299 (patch) | |
tree | c9cd35acf8600759812b3e17d69531a5d25fbf37 | |
parent | f45e6a28b13db539a73482649abf2671ad9d591e (diff) | |
download | org-mode-b93416952602260f92812eeade4d15380e546299.tar.gz |
Get rid of some compiler warnings
-rwxr-xr-x | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/org-clock.el | 8 | ||||
-rw-r--r-- | lisp/org-wl.el | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1baa90..2a02b2c 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2010-04-18 Carsten Dominik <carsten.dominik@gmail.com> + * org-clock.el (org-clock-out, org-clock-cancel): Get rid of + compilation warning, add comment that this cannot be done with + `with-current-buffer'. + + * org-wl.el (org-wl-open): Use `with-current-buffer'. + * org.el (overlay, org-remove-empty-overlays-at) (org-outline-overlay-data, org-set-outline-overlay-data) (org-show-block-all, org-hide-block-toggle) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 26d10f9..5084f7f 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1199,8 +1199,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." (if (not (org-clocking-p)) (if fail-quietly (throw 'exit t) (error "No active clock"))) (let (ts te s h m remove) - (save-excursion - (set-buffer (org-clocking-buffer)) + (save-excursion ; Do not replace this with `with-current-buffer'. + (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) @@ -1267,8 +1267,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." (interactive) (if (not (org-clocking-p)) (error "No active clock")) - (save-excursion - (set-buffer (org-clocking-buffer)) + (save-excursion ; Do not replace this with `with-current-buffer'. + (with-no-warnings (set-buffer (org-clocking-buffer))) (goto-char org-clock-marker) (delete-region (1- (point-at-bol)) (point-at-eol)) ;; Just in case, remove any empty LOGBOOK left over diff --git a/lisp/org-wl.el b/lisp/org-wl.el index ac2f4af..0534342 100644 --- a/lisp/org-wl.el +++ b/lisp/org-wl.el @@ -223,11 +223,10 @@ for namazu index." (let ((old-buf (current-buffer)) (old-point (point-marker))) (wl-folder-goto-folder-subr folder) - (save-excursion + (with-current-buffer old-buf ;; XXX: `wl-folder-goto-folder-subr' moves point to the ;; beginning of the current line. So, restore the point ;; in the old buffer. - (set-buffer old-buf) (goto-char old-point)) (and (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets article)) |