Ver Fonte

org.el: Silence byte-compiler

* lisp/org.el (org-optimize-window-after-visibility-change): Drop
unused let-binding added in a8e812e60.
Kyle Meyer há 4 anos atrás
pai
commit
799e5dac92
1 ficheiros alterados com 13 adições e 14 exclusões
  1. 13 14
      lisp/org.el

+ 13 - 14
lisp/org.el

@@ -6593,20 +6593,19 @@ With numerical argument N, show content up to level N."
   "Adjust the window after a change in outline visibility.
 This function is the default value of the hook `org-cycle-hook'."
   (when (get-buffer-window (current-buffer))
-    (let ((wstart (window-start)))
-      (cond
-       ((eq state 'content)  nil)
-       ((eq state 'all)      nil)
-       ((and (eq state 'folded) (eq last-command this-command))
-	(set-window-start nil org-scroll-position-to-restore))
-       ((eq state 'folded) nil)
-       ((eq state 'children)
-	(setq org-scroll-position-to-restore (window-start))
-	(or (org-subtree-end-visible-p) (recenter 1)))
-       ((eq state 'subtree)
-	(when (not (eq last-command this-command))
-	  (setq org-scroll-position-to-restore (window-start)))
-	(or (org-subtree-end-visible-p) (recenter 1)))))))
+    (cond
+     ((eq state 'content)  nil)
+     ((eq state 'all)      nil)
+     ((and (eq state 'folded) (eq last-command this-command))
+      (set-window-start nil org-scroll-position-to-restore))
+     ((eq state 'folded) nil)
+     ((eq state 'children)
+      (setq org-scroll-position-to-restore (window-start))
+      (or (org-subtree-end-visible-p) (recenter 1)))
+     ((eq state 'subtree)
+      (when (not (eq last-command this-command))
+	(setq org-scroll-position-to-restore (window-start)))
+      (or (org-subtree-end-visible-p) (recenter 1))))))
 
 (defun org-clean-visibility-after-subtree-move ()
   "Fix visibility issues after moving a subtree."