Browse Source

Changed two uses of setq to let, to fix compiler warnings

John Wiegley 14 years ago
parent
commit
332113111c
2 changed files with 30 additions and 30 deletions
  1. 14 14
      lisp/org-agenda.el
  2. 16 16
      lisp/org-list.el

+ 14 - 14
lisp/org-agenda.el

@@ -4795,20 +4795,20 @@ FRACTION is what fraction of the head-warning time has passed."
 		(setq tags (org-get-tags-at))
 		(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
 		(setq head (match-string 1))
-		(setq remove-re
-		      (if org-agenda-remove-timeranges-from-blocks
-			  (concat
-			   "<" (regexp-quote s1) ".*?>"
-			   "--"
-			   "<" (regexp-quote s2) ".*?>")
-			nil))
-		(setq txt (org-format-agenda-item
-			   (format
-			    (nth (if (= d1 d2) 0 1)
-				 org-agenda-timerange-leaders)
-			    (1+ (- d0 d1)) (1+ (- d2 d1)))
-			   head category tags
-			   timestr nil remove-re)))
+		(let ((remove-re
+		       (if org-agenda-remove-timeranges-from-blocks
+			   (concat
+			    "<" (regexp-quote s1) ".*?>"
+			    "--"
+			    "<" (regexp-quote s2) ".*?>")
+			 nil)))
+		  (setq txt (org-format-agenda-item
+			     (format
+			      (nth (if (= d1 d2) 0 1)
+				   org-agenda-timerange-leaders)
+			      (1+ (- d0 d1)) (1+ (- d2 d1)))
+			     head category tags
+			     timestr nil remove-re))))
 	      (org-add-props txt props
 		'org-marker marker 'org-hd-marker hdmarker
 		'type "block" 'date date

+ 16 - 16
lisp/org-list.el

@@ -1289,22 +1289,22 @@ this list."
 	   beg)
       (unless (fboundp transform)
 	(error "No such transformation function %s" transform))
-      (setq txt (funcall transform list))
-      ;; Find the insertion place
-      (save-excursion
-	(goto-char (point-min))
-	(unless (re-search-forward
-		 (concat "BEGIN RECEIVE ORGLST +" name "\\([ \t]\\|$\\)") nil t)
-	  (error "Don't know where to insert translated list"))
-	(goto-char (match-beginning 0))
-	(beginning-of-line 2)
-	(setq beg (point))
-	(unless (re-search-forward (concat "END RECEIVE ORGLST +" name) nil t)
-	  (error "Cannot find end of insertion region"))
-	(beginning-of-line 1)
-	(delete-region beg (point))
-	(goto-char beg)
-	(insert txt "\n"))
+      (let ((txt (funcall transform list)))
+	;; Find the insertion place
+	(save-excursion
+	  (goto-char (point-min))
+	  (unless (re-search-forward
+		   (concat "BEGIN RECEIVE ORGLST +" name "\\([ \t]\\|$\\)") nil t)
+	    (error "Don't know where to insert translated list"))
+	  (goto-char (match-beginning 0))
+	  (beginning-of-line 2)
+	  (setq beg (point))
+	  (unless (re-search-forward (concat "END RECEIVE ORGLST +" name) nil t)
+	    (error "Cannot find end of insertion region"))
+	  (beginning-of-line 1)
+	  (delete-region beg (point))
+	  (goto-char beg)
+	  (insert txt "\n")))
       (message "List converted and installed at receiver location"))))
 
 (defun org-list-to-generic (list params)