Browse Source

Get rid of some compiler warnings

Carsten Dominik 15 years ago
parent
commit
b934169526
3 changed files with 11 additions and 6 deletions
  1. 6 0
      lisp/ChangeLog
  2. 4 4
      lisp/org-clock.el
  3. 1 2
      lisp/org-wl.el

+ 6 - 0
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)

+ 4 - 4
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

+ 1 - 2
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))